Hi , I am Atul . I am trying to create pagination functionality and searching sorting without using pagination widget that provided by outsystems. i have already created some part of that application , but i have not create everything, i am just trying to do sorting , searching and pagination by using local variables. help me to solve this , how i can achieve my goal.
for reference i am attaching the OML file here .
Why are you trying to create a custom pagination component? The built-in one in OutSystems works perfectly fine. For more information on sorting, searching, and pagination, you can refer to these threads:
https://success.outsystems.com/documentation/11/building_apps/user_interface/patterns/using_mobile_and_reactive_patterns/navigation/pagination/https://www.outsystems.com/forums/discussion/76846/combined-search-functionality/https://success.outsystems.com/documentation/11/building_apps/user_interface/creating_and_editing_tables/table_pagination_and_sorting/
i know, but i am trying to do it for personal understanding..
Hi @ATUL TIWARI,
If you are asking about the logic behind the pagination widget, it is as follows:
1. Variables
Imagine that the data is sorted in a stack, you will have 3 variables to work with:
2. Navigation Events
You either are moving forward or backward in the stack. Each step depends on the Start Index and Max Records (step size). We shall use the Total Count and Max Records to determine how many steps there is.
The other event shall be triggered when the search variables has been changed. Note that when the search value changes, then the size of the Total Count will change, and the Start Index must be reset to 0.
Here is an updated version of your uploaded module.
This is the go to article on pagination:
https://itnext.io/paginating-sorting-and-filtering-data-from-a-data-action-f5cb997fdc60
Hi,
If you want to customize sorting, filtering, pagination, etc., you can create a screen template with tables. It's very easy to copy the functions you want. Learn about aggregate( filter, table sort, start index, max records, etc).
Hope this helps!