Hi everyone !
It is my first week on OutSystems. I'm trying to paginate by 10 records a list which gets the records from a SQL personalized query. But I don't know how to proceed !
Hi Gabriela,
You have to add a new input parameter to the sql query to know your startIndex, which you can use in the SQL with an "OFFSET" statement. Then you need to perform a seperate count query to get the TotalCount.
Also, check this post: https://www.outsystems.com/forums/discussion/56770/sql-offset-and-os-pagination/
Hope it helps!
You're very close!
You cannot use the count from the other SQL query since the count will always be 10. So therefore you have to do the SQL query again. You can copy the SQL query without the pagination part and with SELECT count(*). This will get you the maxRecords.
Hello
For pagination with Advance SQL widget there are multiple post there you can check them here:-
Hope this helpsBest RegardsTousif Khan
I followed one of the examples, but still having one issue. I think i know what is the problem but i don't know how to solve it. I make the count on CandidateHardSkills, but that entity is always empty, I need to make the count on the CandidateHardSkills List ( output of the first query). I am thinking rigth ? Thank you so much for helping me !!
I've solved it already. I'm leaving the app just in case anyone else has similar doubts to mine, so they can use my experience as a reference. Thank you very much for your help!