Wednesday, May 15, 2019

Move/Copy document or item from one site collection to other site collection



Enable workflow elevated permissions

Below are the high-level steps to do enable the workflow:

  1. Allow the workflow to use app permissions in a SharePoint Server 2013/Online site.
  2. Grant full control permission to the workflow.
  3. Wrap the call action inside app step.

  • Go to Site Settings, under Users and Permissions, and click Site app permissions.   
  • Activate the Workflows can use app permissions feature 

Refrence:
https://docs.microsoft.com/en-us/sharepoint/dev/general-development/create-a-workflow-with-elevated-permissions-by-using-the-sharepoint-workflo

Save Pen Input , Images into SharePoint using Power Apps and Flows

Save Pen input or Image into SharePoint using power apps and flows

1. Create flow

New --> Create from template -- > select upload a photos to SharePoint folder

            get  file name and file content from power apps button trigger:

            get and set file Name:

              Add action -- > Data Operation(composed)

              triggerBody()['file']['name']
           
            get and set file content:

            Add action -- > Data Operation(composed)

            base64ToBinary(triggerBody()['file']['contentBytes']) 


          Create file:
                         
            Site address:  siteUrl
            Library:         pictureLibarry
            File:               test.jpg
            ContetBytes:

Save flow

2.power app button trigger switch to flow (pass file from power apps to flow)

open the Url: https://flowstudio.app/

open the above link and right click on file display of the flow and change the JSON definition of the trigger.manual.kind from "Button" to "PowerApp".

3.create a power app screen which contains text input, pen input and button controls

add below code button onSelect

Patch(PowerAppsImages, Defaults(PowerAppsImages), {Title: txtTitle.Text, MyImageData: PenSignature.Image });

PowerAppsFlowUploadImage.Run({file:{name:"Test.jpg",contentBytes:PenSignature.Image}});

Patch command save metadata into sharepoint list (PowerAppsImages) and file pass to flow
flow read the file and save into library and metadata into list.

Below link for reference:
http://johnliu.net/blog/2018/7/the-simplest-no-code-solution-to-save-pictures-files-from-powerapps-to-flow