A user has sent me examples of reports, produced by Power Automate, which she says are incorrect. I have checked the flow and after doing my own tests, it seems that the Get Items action which selects the data for the report, is not working correctly.
I have rerun the same flow several times in quick succession and the Get Items action is returning a different number of records and the dataset returned contains duplicate values. For example:
Run time | Records returned | Number of duplicates |
12.52 | 2035 | 39 |
14.29 | 2024 | 28 |
14.35 | 2055 | 48 |
15.01 | 2052 | 48 |
I have also noted that records values are missing from each set returned. It seems possible that the duplicate records have replaced the missing ones.
The action is reading a SharePoint table containing about 48,000 records and is using an indexed column to select the records and sort them by this field. The action's Filter Query parameter is:
Session_x0020_time ge '2023-11-01T00:00:00.000Z' and Session_x0020_time le '2023-12-01T00:00:00.000Z'
and the action's Order By value parameter is:
Session_x0020_time
I retested the flow, removing the Order By parameter and the results were now consistent and (as far as I can tell) correct:
Run time | Records returned | Number of duplicates |
15.55 | 2052 | 0 |
16.04 | 2052 | 0 |
Is there some sort limit that this query is hitting that is preventing it returning the correct data?
@creativeopinion Thanks for your response. I already have pagination set on the Get Items action with a threshold of 5000 records. The times are stored as UTC in the SharePoint list and the variability of the results minute-to-minute do not indicate a time zone issue, since the source field is always set to 00 or 30 minutes past an hour.
The consistent results since I removed the Order By parameter would seem to indicate that the problem stems from some SharePoint indexing limitation.
@biterbit You'll need to check the following:
For more flow troubleshooting tips—check out this YT Tutorial: 5 Power Automate Troubleshooting FAQs and Helpful Tips for Creating Better Flows
IN THIS VIDEO:
✅ How to troubleshoot a false Condition action result
✅ How to get dynamic content when it isn’t selectable from the list of dynamic content
✅ How to troubleshoot an Apply to Each action that isn’t looping through
✅ How to troubleshoot a skipped Apply to Each action
✅ How to troubleshoot a Filter Query
✅ How to use a SharePoint yes/no column in a Filter Query
✅ How to use Compose actions to troubleshoot a Power Automate flow
✅ How to troubleshoot multiple emails being sent
✅ How to troubleshoot multiple Teams messages being sent
WarrenBelz
146,524
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,906
Most Valuable Professional