872
Views
7
Comments
How to do pagination when get data from DataAction
Question

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.


Pagination_DataAction.oml
2025-04-15 04-00-33
Prakhar Sharma

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

2020-09-21 11-35-56
Sachin Waghmare

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

2024-01-31 05-29-41
Akshay Deshpande

Hello, Annie Bibiana Yesudass, 

Adding to above answers

Please check this forge component as well

I hope this helps.

Thanks and Regards,

Akshay Deshpande

2024-01-04 09-21-21
Venkatesaiya

Hi @Annie Bibiana Yesudass ,
I did the some changes in your attached OML.
 Kindly refer the OML, I attached here. 

Pagination_DataAction.oml
2025-04-08 13-09-23
Shubham Shrivastava

Hi Annie,

You can refer to the below OML.

DataActionPagination.oml
2025-01-09 14-56-57
IQ78

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.

Paging_DataAction.oml
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.