I have a page with several data filters. I set a maximum of 10 records to be displayed in the pagination, however, when I use any of the filters, the maximum number of 10 records does not work and a huge list appears.
Furthermore, the filter only works on the first page of the pagination.
Hi, thanks for everyone's help.
I was doing the pagination and filtering as I observed in the outsystems documentation and with the help of the forums, but something was still going wrong. After observing everything carefully I realized that the error was in my DataAction. I was passing current.result to the values of my data action, so I changed it to local variables (which were the ones that received the filter), so the Refresh DataAction worked and maintained the pagination.
Hello,
Can you share screenshots of the code?
Hi, i can share a little.
I can see that you're getting results not from a Query directly but from an API.
Do you have access to the API code? Because the issue might be there.
Hello vn_perpetuo, Check the following links, I feel you aren't doing pagination right :)
Best regards,
Ana
Hey @vn_perpetuo ,
I have create a sample pagination demo where I am filtering the table based on Country Id(726).
I am attaching an OML. I hope this will help you!
Have a good day!
Thanks & Regards,
Sudip Pal
Hello @vn_perpetuo
Here is the good post from @Kilian Hekhuis where he had explained very well the pagination, sorting with example while data has been fetched by data action. Please refer this blog for your issue resolution.
https://itnext.io/paginating-sorting-and-filtering-data-from-a-data-action-f5cb997fdc60
Thanks,
Sachin
Hi @vn_perpetuo hope You're well!
I think there's a misunderstanding on how to use the page variables (StartIndex and PageSize). Passing the updated values to the loop in Paginacao will probably not work because the data action doesn't seem to have been run again with the updated page values.
The updated page values have to be sent to the action that gets the data.
So, I understand you have a DataAction1 object attached to your screen. I guess this Data Action is getting its data from Get_Lote_Objeto Service Action.
What I guess you should be doing is:
I hope I have been able to understand your question and been of some help.
Good luck and best regards!