cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PVLove
Helper I
Helper I

Display Modified SharePoint Files in Gallery

Hello All,
I'm creating a Gallery that will display a SharePoint document library subfolder and the files that have been modified within the past 7-days. I was able to display the files in the subfolder with this formula:

 

Filter(Documents, IsFolder = false && StartsWith('Folder path', "Shared Documents/Estimating")

 

However, I'm not sure what formula to add to display the modified files. I've tried the following and the gallery is blank and nothing is displayed. Your help is sincerely appreciated!

 

Filter(Documents, IsFolder = false && StartsWith('Folder path', "Shared Documents/Estimating"), Modified >= DateAdd(Today(), -7, Days))

OR

Filter(Documents, IsFolder = false && StartsWith('Folder path', "Shared Documents/Estimating") || (Modified > DateAdd(Today(),-7,Days)))

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User III
Super User III

Hi @PVLove ,

Apart from none of that being Delegable (so it will not work as your Library grows, this should work

Filter(
   Documents, 
   !IsFolder && 
   StartsWith(
      'Folder path', 
      "Shared Documents/Estimating"
   ) && 
   Modified >= DateAdd(
      Today(), 
      -7, 
      Days
   )
)

however you could try this

With(
   {
      wLib:
      Sort(
         Documents,
         Modified,
         Descending
      )
   },
   Filter(
      wLib, 
      !IsFolder && 
      StartsWith(
         'Folder path', 
         "Shared Documents/Estimating"
      ) && 
      Modified >= DateAdd(
         Today(), 
         -7, 
         Days
      )
   )
)

which would use the newest 500-2000 (depending on your settings) in the filter at the bottom. You would also not get any Delegation warnings.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

View solution in original post

2 REPLIES 2
WarrenBelz
Super User III
Super User III

Hi @PVLove ,

Apart from none of that being Delegable (so it will not work as your Library grows, this should work

Filter(
   Documents, 
   !IsFolder && 
   StartsWith(
      'Folder path', 
      "Shared Documents/Estimating"
   ) && 
   Modified >= DateAdd(
      Today(), 
      -7, 
      Days
   )
)

however you could try this

With(
   {
      wLib:
      Sort(
         Documents,
         Modified,
         Descending
      )
   },
   Filter(
      wLib, 
      !IsFolder && 
      StartsWith(
         'Folder path', 
         "Shared Documents/Estimating"
      ) && 
      Modified >= DateAdd(
         Today(), 
         -7, 
         Days
      )
   )
)

which would use the newest 500-2000 (depending on your settings) in the filter at the bottom. You would also not get any Delegation warnings.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

View solution in original post

@WarrenBelz, thank you so very much.  The second formula worked like a charm!

Patti

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,020)