Hi, I am trying to do pagination for the DataAction table. For Aggregate, I am to get pagination but DataAction I am unable navigate any data. I have attached sample oml file for reference. For the Cities screen I am trying to do page.
Hi @Annie Bibiana Yesudass,
You can refer to this component. This is a demo application that contains the same logic which you need to implement.
https://www.outsystems.com/forge/component-overview/12354/paginating-data-action-example
Regards,
Prakhar Sharma
Hello @Annie Bibiana Yesudass,
Please check this article written by @Kilian Hekhuis. Hope this will help you to implement the required functionality.
https://itnext.io/paginating-sorting-and-filtering-data-from-a-data-action-f5cb997fdc60
Thanks,
Sachin
Hello, Annie Bibiana Yesudass, Adding to above answers
Please check this forge component as well
I hope this helps.
Thanks and Regards,
Akshay Deshpande
Hi @Annie Bibiana Yesudass ,I did the some changes in your attached OML. Kindly refer the OML, I attached here.
Hi Annie,
You can refer to the below OML.
Hi there,
It is the easiest way, use advance query using something like this:
"SELECT *FROM {TechLead} TechLeadorder by " + EncodeSql(TableSort) + " desc " +" OFFSET " +StartIndex+" rows " +" fetch next " + MaxRecords + " rows only
Big Core Data Action Picture:
The Detail Steps - as in the comment:
1.a [sqlmeTot] Create total -select all records-, for example:
"SELECT count(*)FROM {TechLead}"
Be ware of the advance query Expand Inline:
1.b [SQLMe] -select only paging records- for example:
"SELECT *FROM {TechLead} TechLeadorder by " + EncodeSql(TableSort) + " desc " +" OFFSET " +StartIndex+" rows " +" fetch next " + MaxRecords + " rows only "
2. Pagination widget - use the total count (total Rows of the data action Output):
On Pagination, just set new start index and refresh the FetchMe data action:
3. On Sort -just try like this-:
For the complete example, i attach the personal oml.
May this helps.
Another beautiful way, using index:
https://www.outsystems.com/forge/component-overview/19218/pagination-using-data-action-as-a-source
regards