cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Filter OData in SharePoint Get Files action by date

hi guys,

 

so I have a document library that is chokka blok full of documents(132k). I'm trying to get a way to move small ish blocks of documents into specific files. Im currently using the method below. My problem is that I know can only run a maximum of 5000 iterations of Apply to each, so to reduce the number of iterations I want to filter get files with an odata filter to pull out chunks of documents by the modified by or modified column. i just dont know how.

 

can anyone help - i've tried the documentation , by im obviously not tech enough to understand it

 

Currently the flow below works but never completes , it just runs and runs and runs

 

Recurrance

 

get files(Properties Only)

 

Apply to each

 

condition ( is eq to " text" )

 

get content

 

move file

1 REPLY 1
Highlighted
Community Support
Community Support

Re: Filter OData in SharePoint Get Files action by date

Hi @Anonymous,


Do you want to use filter query to return files based on the Modified date?
Let’s say you want files that modified date greater or equals 7 days ago from Today.
Then you could try the following code:

Modified ge 'formatDateTime(addDays(utcNow(),-7),'yyyy-MM-ddThh:mm:ssZ')'

Note: Please make sure the formatDateTime is surrounded by a single quote.

1.PNG
More details about Odata filter query, please check the following doc for more details:
https://docs.microsoft.com/en-us/previous-versions/dynamicsnav-2016/hh169248(v=nav.90)
If you need more help, please feel free post back.

 

Best regards,
Mabel

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (7,861)