Skip to main content

How to Sort SharePoint Items and Get More Than 100 in Power Automate

· 5 min read
Jagdish Kumawat
Founder @ Dewiride

Two advanced parameters of Get items decide what comes back and in what order. Order By sorts the items, such as StartTime for oldest first or StartTime desc for newest first. Top Count sets how many come back, up to 5,000. Microsoft's article says the default is 100, so set it whenever a list can grow.

The example is Get Waiting Approvals, a flow of the Overtime Timesheet app. It returns the overtime entries waiting for an approver, oldest shift first, and must not miss any.

Prerequisites​

Step 1: Sort with Order By​

Under Advanced parameters, show Order By, and enter the column's internal name:

Get the pending entries → Order By
StartTime

Microsoft's in-depth Get items article gives the format: the column name followed by asc or desc, such as Title asc or Start_x0020_Date desc. StartTime with neither sorted the entries oldest first.

Step 2: Set Top Count​

Show Top Count and enter how many items to return at most. I entered the highest the article allows without pagination:

Get the pending entries → Top Count
5000

The Get the pending entries pane with Filter Query Status eq 'Pending', Order By StartTime and Top Count 5000 among its six advanced parameters

The article says:

  • The default item limit is 100: with only the site and list set, the action returns 100 items.
  • You can increase this limit up to the list view threshold limit of 5,000 with Top Count.
  • If you go beyond 5,000 item limit, Power Automate fails and generates an error dialog.

The field's own hint says (default = all), which doesn't match the article. Setting Top Count yourself removes the doubt.

The Result​

An approver with two entries waiting got them oldest shift first, 29 October before 8 November, and the app shows them in that order:

The Waiting for approval screen saying 2 entries are waiting for your decision, with Admin User, Thu 29/10/2026, 18:00 to 20:00, 2.00 hours, Emergency Department, above Admin User, Sun 08/11/2026, 08:00 to 11:00, 3.00 hours, Emergency Department

More Than 5,000 Items​

This flow doesn't come near 5,000 pending entries, so I didn't turn on pagination. For lists that do, the article documents a known limitation: with a filter query on a list of more than 5,000 items, you may observe that no records are returned if there are no items matching the filter query in the first 5000 items. Its fix is to enable Pagination on Get items from the action settings menu.

Common Mistakes​

MistakeWhat happensDo this instead
Leaving Top Count emptyThe article says only 100 come backSet it
Top Count above 5,000The action fails5,000, or pagination
Sorting in the app insteadExtra work in the appOrder By in the flow
A display name with spaces in Order ByThe column isn't foundThe internal name, _x0020_ for spaces

Troubleshooting​

SymptomLikely causeFix
Exactly 100 items come backTop Count isn't setSet Top Count
Newest first instead of oldestdesc after the columnRemove desc, or add asc
No items on a very large listNo match in the first 5,000Turn on pagination in the action's settings

FAQ​

Can I sort by two columns?​

Microsoft's SharePoint REST article says to specify a comma-separated list of fields, such as Department asc, StartTime asc.

Does sorting change what the filter returns?​

No. Filter Query decides which items come back, Order By their order and Top Count how many.

Conclusion​

Set Order By to sort the items, such as StartTime, and Top Count to how many you need, up to 5,000, instead of relying on the default of 100. Past 5,000, turn on pagination.

Additional Resources​