0

I have a big document library has documents for than one lakh in it. I am trying to get all documents created in certain months in year, let's say I want to get all documents created in the month of April '2021' In the Power Automate Odata filter query, how we can we add this as filter query.

Similarly, in the SharePoint Online document library - want to create a view for this filter. What will be filter criteria for this?

2
  • How many documents are there for April 2021 month in this library? Dec 7, 2022 at 8:19
  • More than 10k documents.
    – SP 2022
    Dec 7, 2022 at 8:50

1 Answer 1

1

For SharePoint out of the box view in document library, use filter conditions like this:

enter image description here


For Power Automate flow, use filter query like:

Created ge datetime'2021-04-01T00:00:00Z' and Created le datetime'2021-04-30T00:00:00Z'

Source: Filter Created in SP REST API

Also,

  1. Set Top Count of "Get items" action to 5000
  2. Enable pagination from settings of "Get items" action and set pagination threshold more than 10000.
  3. Add indexing on "Created" column from library settings

Top Count:

enter image description here

Pagination settings:

enter image description here

4
  • Hi Ganesh - It is not working, the Power Automate Get items throwing error "BadRequest. The action 'Get_items' has an aggregated page results size of more than '233568356' bytes. This exceeded the maximum size '209715200' bytes allowed." I have 80K items in my document library, I want to retrieve all the items.
    – SP 2022
    Dec 13, 2022 at 6:15
  • There are some message size limits in Power automate flows: learn.microsoft.com/en-us/power-automate/…. Check similar issue thread for list rows from excel action: inogic.com/blog/2022/01/…. So, you may need to get the items in batches using multiple get items actions. Dec 13, 2022 at 8:07
  • I have seen those links - can you give an example of batches?
    – SP 2022
    Dec 13, 2022 at 8:13
  • If you know the item ID range for documents, you can try adding additional filters like ID gt 1 and ID lt 5000. Then ID gt 5000 and ID lt 10000. Dec 13, 2022 at 8:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.