Page 1 of 1

Save total number of records to be shown in paged table

Posted: Tue Aug 25, 2015 10:28 pm
by mjamaluddingari

Is there a way to save the number of records shown in a table. I would like to save the current page shown as well (shown in the screenshot). I wanted to use this hint 'initial-page-size' in the presentation hints of a table to show these number of records.

Re: Save total number of records to be shown in paged table

Posted: Thu Aug 27, 2015 2:27 pm
by C. Tampitsikas

Thanks for the question.
We will check whether there is a solution on what you are trying to do and come back to you ASAP.

Re: Save total number of records to be shown in paged table

Posted: Fri Aug 28, 2015 7:44 pm
by Byron Glueck
Can you please confirm LSPS version build number? Assuming 2.7.x:

To store/set a page size (number of entries) to display in a table of type lazy or paged:
Create a variable (e.g., myPageSizeHint) or storage location to hold the initial-page-size hint value, defaulting its value as necessary and using this variable for the table hint value.
At execution-time, the variable value can be set to the number of entries in the page, using the second parameter value of the table Data property. For example:

Code: Select all
   startIndex, resultSize ->

      myPageSizeHint := resultSize;



This will store the current result size selected to the variable (for later use). The value must be stored beyond the lifecycle of the form, if you are expecting to utilize this value for form loading events.

Given the potentially dynamic nature of the data used to populate a table component, saving the current page is not feasible. Since the data loaded on a given table is not necessarily static, there is no guarantee that the same “page” number or set of entries will be subsequently loaded. However, you may set the table ShowIdx property to set a specific entry’s index value of the overall data set. This will load the corresponding table page containing that entry index. Note that this applies only to the initial load of the page and is not enforced when the end-user selects a different page of data to display, etc.