Logo Practice with Ankit | Form and DB Operations

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:

  1. The list must display a maximum of 5 records per page.
  2. Records must be sorted by **Name (Ascending)** by default in the Data Action logic.
  3. 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.

Ankit G Avatar
About the Author: Ankit Gangrade

Ankit Gangrade is a passionate Low-Code Architect, Developer, & Educator dedicated to helping students and professionals build modern applications faster using OutSystems and Cloud-Native technologies. His goal is to bridge the gap between traditional coding and modern low-code platforms — empowering the next generation of developers to build smart, scalable, and cloud-ready apps.