How to Handle Power Apps Gallery Pagination for Over 4,000 Records
Question details
The user needs to display more than 4,000 records in a Power Apps gallery without encountering incomplete results caused by delegation limits.

- Product
- Power Apps
- Device & OS
- not provided
- Scenario
- Displaying and paginating through a large dataset of over 4,000 records in a canvas app gallery.
- Observed behavior
- Loading the entire data source into a collection directly produces incomplete results because Power Apps enforces strict delegation limits on non-delegable queries.
Verify that your underlying data source connector (such as Dataverse or SQL Server) supports server-side delegation for sorting and filtering.
Implement Delegation-Friendly Server-Side Pagination
Use context variables and delegable functions to manage current pages and fetch data in manageable chunks without breaching delegation limits.
Power Apps has strict delegation limits (typically capped at 500 to 2,000 records). To handle datasets exceeding 4,000 records, you must rely on server-side processing. This involves using variables to track your current page and ensuring your formulas are fully delegable to the data source.
Select your screen, navigate to the OnVisible property, and define your page variables. Use the formula: UpdateContext({CurrentPage: 1, PageSize: 50}).
Insert two buttons onto your screen labeled 'Next' and 'Previous'. For the 'Next' button's OnSelect property, enter: UpdateContext({CurrentPage: CurrentPage + 1}). For the 'Previous' button, use: If(CurrentPage > 1, UpdateContext({CurrentPage: CurrentPage - 1})).
Select your gallery and update the Items property. If your connector supports the Skip function, use: FirstN(Skip(DataSource, (CurrentPage - 1) * PageSize), PageSize). Alternatively, filter by indexed ID columns if Skip is not delegable.
Review your formula bar. If you see a blue or yellow underline beneath your code, Power Apps cannot delegate the query. You must adjust your formula or indexing strategy to ensure full server-side processing.

Boost Your Data Management Workflow with WPS Office
While navigating Power Apps delegation limits requires complex formulas, managing exported app data shouldn't be difficult. WPS Office provides a powerful, lightweight, and highly compatible alternative to Microsoft Office, perfect for analyzing large datasets and creating data reports without the hassle.

Frequently Asked Questions
Why does my Power Apps gallery only show 500 records?
By default, Power Apps sets a non-delegable data row limit of 500 records to maintain app performance. If your formula is not delegable, Power Apps will only process the first 500 items locally. You can increase this limit up to 2,000 in the app settings, but it is better to use delegable formulas.
Can I load 4,000 records into a Power Apps collection?
You cannot load more than the delegation limit (maximum 2,000) directly into a collection with a single ClearCollect command. You would need to use complex concurrent or sequential batching scripts, which can severely impact app load times.
What does a delegation warning mean in Power Apps?
A delegation warning, usually indicated by a colored underline in the formula bar, signifies that the requested data operation cannot be offloaded to the data source server. The app will process the query locally, restricting your results to the delegation limit (up to 2,000 rows).
Does the Skip function support delegation in all data sources?
No, delegation support for the Skip function depends entirely on the underlying data source connector. It is often not delegable in SharePoint, which means you may need to use alternative filtering methods, such as sorting by a sequential numeric ID column.




