cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AB_
Regular Visitor

Error getting pages from Site Pages library to other library based on metadata

Hi everyone,

 

We're pretty new to Power Automate, but we're trying to move newspages/pages in the SitePages library to another 'archive' library based upon a column 'Archiveren' (choice field yes/no/later). So if you change this column in the site pages library, it should automatically start a flow in which the page or pages are moved to a library called 'testpages'

 

If yes, then the page should be moved to the archive library.

 

What we did is shown in the screenshots attached:

1.Choose 'when a file is created or modified in a folder' - we gave the ID of the site pages library in the library 'name field'

2. Get files (properties only) 

3. Condition: if 'Archiveren' = 'ja' (yes)

4. Get file metadata >Copy file (in the new library - testpages) > Delete file (in the sitepages library)

 

Anyone care to help us out? Big thanks in advance!

 

Schermopname (191).pngSchermopname (192).pngSchermopname (193).png

 

1 REPLY 1
Expiscornovus
Dual Super User
Dual Super User

Hi @AB_,

 

I had a quick look at your current setup. I see the Copy file is using the DisplayName of the file.

 

However, as far as I am aware the 'Het pad naar het doelbestand' field expects a destionation folder. So, in your setup Testpages should be sufficient as a value.

 

Additionally, you could also check with Get changes for an item or a file (properties only) action if the Archiveren? field value has change since the last major version.

 

Below is an example of all those things.

I also added the same custom fields as in the source library to my target library.

 

copyfile_spo.png

 

 

You also might want to use a trigger condition expression if Archiveren? is equal to yes. This will prevent the flow from triggering a lot 😀

 

 

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.

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.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Users online (3,956)