Dear OutSystems community,
I have a problem with pagination/navigation. I am fetching a data using REST and get a list of records, which is correct. I set a default value of MaxRecords to 5, but my list would show all records.
What could be the problem?
Thanks and kind regards,
Elena
Hi @Elena Mulgacheva ,
Just having a maxrecords variable in your screen, and having a pagination widget on it, will not magically reduce the list to the ones you want to show, you still need logic to do that for you.
See this article by @Kilian Hekhuis ,
Dorine
Thanks Dorine, it helped! It works now.
Kind regards,
Hi Elena,
Can you show us what you have set for the list source and its details, as well as what you have set on the Navigation/Pagination widget?
Regards,
PZ
Hello Paulo,
yes, please find screenshots attached.
Thanks.
I am not sure if the Total Count Value is right..
It can be the MaxRecords on the source.
The GetInvestorsRest needs to have a MaxRecords set to 5 in your case.
For the count, you can have a separate output, taking into consideration all the data that comes from your source.
So you will have you list attribute, with the records (in your case, 5) and then another attribute for the count.
Please check if that's the issue, otherwise we can try to check it again.
Dorine is totally right, that article is really great for understanding how these properties related to navigation/pagination work.
I created a sample oml for you, trying to simulate your scenario.
I hope this helps.