cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bschoeni
Frequent Visitor

Move File action for SharePoint does Copy/Delete in some API RuntimeURL = does not keep file ID nor Version History

Hello Community,

 

We need to move files from the root of a library into folders based on the lifecycle of a document. When it's in Draft the file is located in ComplianceDocuments root. When the document is sent out for approval it gets moved into ComplianceDocuments/ReadOnly. When the document is obsolete and needs to be archived it gets moved into ComplianceDocuments/Archived. As there are linked Document Change Requests and Training Receipts we need to keep the same SharePoint ID when moving the files within the same document library. Works fine with the Library action button "Move To...".

 

We have now identified that the SharePoint Action "Move File" in Power Automate does not behave the same across the different API/RuntimeURLs.

 

Used library : default created Documents library (Shared Documents)

Folder : ReadOnly

Version control : activated 1.0, 2.0, 3.0

Approval : not activated

Flow :
- Trigger: For a selected File (tested as well When a File is created or modified (properties) and When an item or file is modified)
- Get File properties
- Move File with option "Replace" (tested as well "New Name")

 

When a Flow runs on :

https://flow-apim-europe-001-northeurope-01.azure-apim.net/apim/sharepointonline

https://unitedstates-002.azure-apim.net/apim/sharepointonline

It mimics exactly what a user would do in the library list view experience with the action button "Move To" within the same library.

File keeps the SharePoint ID and all Version History.

 

When the same identical Flow on the box Documents library runs on :

https://flow-apim-europe-001-westeurope-01.azure-apim.net/apim/sharepointonline

https://flow-apim-msmanaged-na-westus2-01.azure-apim.net/apim/sharepointonline

https://flow-apim-msmanaged-na-centralus-01.azure-apim.net/apim/sharepointonline

https://australia-001.azure-apim.net/apim/sharepointonline

 

The result in the ReadOnly folder is a file with at least an increment of 2 in the ID and a deleted file in the Recycle bin. Version History starts at 2.0 (1.0 create of the file and 2.0 update of the properties). It looks like Flow understands the Move File Action as a bundle of "Copy File" and "Delete File".

 

We are looking into the HTTP route now, but it's quite a hassle for what should be an easy 1 step action 😉

 

Or is there an option to switch a Flow Owner's environment ?

 

Thank you,
Belinda

 

bschoeni_0-1631207343462.png

Before running the Flow :

bschoeni_1-1631207403363.png

 

Result : 

bschoeni_2-1631207428480.png

 

bschoeni_3-1631207441312.png

 

Where to find API - RuntimeURL : on an executed flow open the trigger and click in Inputs to "Show raw inputs" :

bschoeni_0-1631208250025.png

 

 

0 REPLIES 0

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (1,747)