Introduction
When a Power Apps Canvas App works with a large number of records, displaying everything at once can make the application difficult to use and may affect performance.
Pagination provides a simple solution by dividing records into smaller pages, such as 25 records per page, and allowing users to navigate using Next and Previous buttons.

What Is Pagination?
Pagination means dividing a large dataset into smaller groups called pages.
For example, if a Dataverse table contains 1,000 customer records:
Page 1 → Records 1–25
Page 2 → Records 26–50
Page 3 → Records 51–75
...
Page 40 → Records 976–1000Instead of displaying all 1,000 records together, the app displays only the records required for the current page.
Benefits
Better user experience
Smaller data payload
Easier navigation
Better control over large datasets
Useful for grid-style applications
When Should You Use Pagination?
Pagination is useful when your business requirement includes:
Page numbers
Next and Previous buttons
Fixed records per page
Navigation through a large result set
A traditional table or grid experience
For example:
Customer List
Customer Name City Status
----------------------------------------
ABC Ltd Mumbai Active
XYZ Ltd Pune Active
ABC Corporation Delhi Inactive
...
[Previous] Page 1 [Next]However, pagination isn't always necessary.
If users mainly need to search, filter, or sort, it is often better to use delegable queries directly against the data source.
Two Common Approaches
There are two approaches you should understand.
1. Automatic Data Loading
If a Gallery is directly connected to a remote data source:
Gallery1.Items = CustomersPower Apps can retrieve data incrementally as needed.
This is the simplest approach when you don't need explicit page numbers.
Use this when:
Users need:
✓ Search
✓ Filter
✓ Sort
✓ Scroll through records2. Custom Pagination
If the business specifically requires:
Page 1 | Page 2 | Page 3or:
[Previous] [Next]you can create your own pagination logic.
Step-by-Step Custom Pagination
Step 1: Create Pagination Variables
On the screen's OnVisible property:
Set(varPageNumber, 1);
Set(varPageSize, 25);Here:
varPageNumberstores the current page.varPageSizedefines how many records appear on each page.
For example:
varPageNumber = 1
varPageSize = 25means:
Display the first 25 records.
Step 2: Configure the Gallery
For a small dataset, the Gallery Items property can use:
FirstN(
Skip(
Customers,
(varPageNumber - 1) * varPageSize
),
varPageSize
)The formula works like this:
Page 1
Skip = (1 - 1) × 25
= 0
Show = 25 recordsResult:
Records 1–25Page 2
Skip = (2 - 1) × 25
= 25
Show = 25 recordsResult:
Records 26–50Page 3
Skip = (3 - 1) × 25
= 50Result:
Records 51–75Step 3: Add a Next Button
Set the Next button's OnSelect property:
Set(
varPageNumber,
varPageNumber + 1
)When the user clicks Next:
Page 1
↓
Page 2
↓
Page 3
↓
Page 4The Gallery automatically displays the corresponding records.
Step 4: Add a Previous Button
Set the Previous button's OnSelect:
Set(
varPageNumber,
Max(
1,
varPageNumber - 1
)
)The Max() function ensures that the page number never becomes less than 1.
Step 5: Display the Page Number
Add a Label and use:
"Page " & varPageNumberThe user will see:
Page 1or:
Page 5Step 6: Disable Previous on Page 1
Set the Previous button's DisplayMode:
If(
varPageNumber = 1,
DisplayMode.Disabled,
DisplayMode.Edit
)This prevents users from clicking Previous when they are already on the first page.
Adding Search
Pagination can also be combined with a search box.
For example:

Join the conversation! Your thoughts help the community grow.