cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sasrsc
Resolver II
Resolver II

getting site pages when in a folder in the root directory

sasrsc_0-1604753988317.png

I am trying to loop through all the files in the site pages folder... and get files requires a library name but there isn't one... this is merely a folder in the root directory.

sasrsc_1-1604754079040.png

https://xxxxxxoffice365.sharepoint.com/sites/CorporateTravelUSPrivate/SitePages/Forms/AllPages.aspx
I have a hundred files in this folder and I want to review the contents looking for certain things....
I'm sorry if this is a simple question but the answer eludes me right now as the action requires a library and blank isn't valid.

1 ACCEPTED SOLUTION

Accepted Solutions
sasrsc
Resolver II
Resolver II

OK, we got this working and it wasn't intuitive to me at least. I'm a true citizen developer and not a pro.

I had to use the "enter custom value" for the Site Pages

sasrsc_0-1605012599189.png

Pretty easy...but then the fun began as we wanted to see if people were updating their site pages for content in a certain area. So we then did a "get file content using path action" and looped through all the site pages. We stored the file content in a new variable (that was a critical step we thought)


On the original Get Files we also did a odata filter to tighten the array.

sasrsc_1-1605012731103.png

Then we used the expression indexOf to locate the "section header" in our document.
We then did an indexOf for the following section and calculated the difference using the sub expression between the index of both sections and we determined that if the difference exceeded 2800 then there is content in between else the person hasn't updated the section. 
Before, someone was looking at all 70 pages manually to see if the section had been updated. 
Now, they are emailed the pages that haven't been updated.
Pretty neat eh....



View solution in original post

1 REPLY 1
sasrsc
Resolver II
Resolver II

OK, we got this working and it wasn't intuitive to me at least. I'm a true citizen developer and not a pro.

I had to use the "enter custom value" for the Site Pages

sasrsc_0-1605012599189.png

Pretty easy...but then the fun began as we wanted to see if people were updating their site pages for content in a certain area. So we then did a "get file content using path action" and looped through all the site pages. We stored the file content in a new variable (that was a critical step we thought)


On the original Get Files we also did a odata filter to tighten the array.

sasrsc_1-1605012731103.png

Then we used the expression indexOf to locate the "section header" in our document.
We then did an indexOf for the following section and calculated the difference using the sub expression between the index of both sections and we determined that if the difference exceeded 2800 then there is content in between else the person hasn't updated the section. 
Before, someone was looking at all 70 pages manually to see if the section had been updated. 
Now, they are emailed the pages that haven't been updated.
Pretty neat eh....



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,571)