Hi newbie here, I want to be able to give a user the option to choose how many records are displayed on a screen, so they can choose 10, 20, 50 per page, what is the best way to accomplish this? Default would be 10.
Hi Peter,
What you can do is to have a dropdown with a list / query with the options you want (10, 20, 50) binded to the MaxRecords variable and with the OnChange linked to the screen action you use to refresh the query.
Something like that:
In this way, you allow the user to control the value of the MaxRecords variable through the Dropdown widget.
Regards,João
The number of records displayed can be specified in the Widget that you're using (e.g. a Table Records). If you use a variable, and change that depending on some user selection, and refresh the Widget (only for Traditional Web App), you should see a different number of records displayed.
Thank you, what if its not in traditional but in reactive? I know how to default it to 10 using the table widget, but I want the user to have the ability to choose 20 or 50.
Hi João,
The Table Records Widget itself must also have that number of lines, or the pagination will go wrong.
EDIT: Ah, for reactive perhaps not. Must brush up on it...
Hi Killian,
In Reactive, the Line Count property does not exist anymore, at least I don't see it as it appears on Traditional Web.
Thank you. How come you used the OnSearch action versus OnPaginationNavigate for the OnChange Event?
I thought it would make sense to go back to page 1 after you change the number of records but you can implement it as per your use case.
In any case, the point was to have a widget binded to the MaxRecords variable so the user can edit it.
Thank you!