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....



View solution in original post

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,896)