cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CMHants
Level: Powered On

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
Community Support Team
Community Support Team

Re: Filter OData in SharePoint Get Files action by date

Hi @CMHants,


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
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,350)