Client Survey
| Id | Name (Link) | Surname | Gender | Marital Status | Have Kids | Mobile | Age | Last Updated On | Remove |
|---|
Showing 0 of 0 records
Page 1
Requirement: Form and DB Operation 10 - Introduce Pagination with Data Action
This final step upgrades the list screen to a professional, paginated view. The goal is to simulate the **server-side work** required for efficient data loading by implementing **OFFSET** and **LIMIT** within the Data Action.
Pagination & Sorting Rules:
- The list must display a maximum of 5 records per page.
- Records must be sorted by **Name (Ascending)** by default in the Data Action logic.
- The pagination controls must show the correct record range (e.g., "Showing 1 to 5 of 12 records").
Data Action Logic Update:
- The simulated Data Action (
getDataAction) must be updated to accept parameters for **Page Size** and the calculated **Offset**. - The Data Action must perform the filtering (Search, Active/Deleted Toggle) *first*, then apply the **Sorting**, and finally perform the **OFFSET/LIMIT** (simulated via
Array.slice()) to return only the current page's records.
All Existing Functionality (Edit, Soft Delete/Restore, Conditional Fields, Search) must remain functional, adapting to the new paginated data source.
Hint: When implementing this in Advanced SQL (the suggested method for this control in OutSystems), you would use the ORDER BY... OFFSET @Offset ROWS FETCH NEXT @PageSize ROWS ONLY syntax.
Practice with Ankit | Form and DB Operations