255 total views, 5 views today
In this Power Automate troubleshooting blog, we will learn how to resolve the problem of Power Automate Get Items Filters not returning values; this problem also occurs with the Get files (properties only) query. This seems to be a strange issue, but there is a quick fix for it. This problem usually occurs with a larger document library or list.
Use Case 1: Power Automate Get Items Filters not returning values
Let’s assume we have a “Template” folder in the document library where only one file is available, but this document library has more than 5000 documents.
Now, let’s go to the “Get Items” query in Power Automate.
Use the “Limit Entries to Folder” feature to get all documents from the given folder or directory path.
We have only one document in the given folder. Now, if we run the flow, it will not return any items; the output will be empty; however, the flow gets executed successfully. It looks very strange to me.
Now, let’s change the approach to adding a filter query as “Limit Folder to Entries” is not working and run the flow again.
Still, we will get the same result: the flow will be executed successfully without returning any values.
Power Automate Get items query returns empty array
We will get the output as below:
- The above two queries work absolutely fine with other sites; they return the expected result from the document library.
- In this case, the filter query works only with the content type-based query but not with other metadata; I’m not sure why this works with the content type filter.
Root cause of the above issue: Get Items Filters not returning any values
The root cause of this issue is the number of items in the document library. You may notice that where these two queries are working, the document library has fewer than 5000 items, and where they are not working, it has more than 5000 items.
However, as per our test, it is not always true that if you have more than 5000 items, you will encounter this issue; sometimes it works with more than 5000 items as well (still, we are investigating on what basis this works and doesn’t work; we will update this article later based on our analysis).
For now, if you face this issue, such as when Get Items filters do not return any values, then refer to the below solution section; otherwise, you can ignore the below section.
Solution: Get Items Filters not returning any values
Enable the pagination from the “Get Items” settings page.
In the threshold limit, enter the total number of items you have in your document library. The maximum threshold number is 100,000.
- The pagination threshold can be configured in the Get files (properties only) action as well.
- If you are deploying the Get Items solution to a production environment, it is always better to configure the maximum number threshold limit; otherwise, your flow might fail later depending on the usage of your document library.
After enabling the pagination and threshold limit, configure the top count as 5000.
Now, if you run your flow, both queries will work as expected.
- After configuring the pagination, threshold limit, and top count, if it still doesn’t work, you need to index the columns that you are using in the filter query.
This is how to resolve an issue when your Get Items or Get Files (properties only) query does not return any results despite having passed a valid query.
If you Google around about this issue, the majority of the community members will first say your query might be wrong and will suggest you correct it.
Summary: Power Automate Get Items Filters not returning values
In this Power Automate troubleshooting blog, we have learned how to fix the issue when Get Items or Get Files (properties only) does not return any values despite having a valid query.
See Also: Power Automate Articles Hub (with real-time example)
- You may visit the Power Automate articles hub
- Take care of what’s important. Automate the rest
If you like our articles, please appreciate our efforts by liking and sharing them with your friends and colleagues. Please join the mailing list to get our articles in your inbox as and when we publish them.
Happy automating and learning!