How to Split records from server action
Application Type
Traditional Web

I have a home page which looks like below . It is a table with local variable as source

Here data related to projects is coming from server action containing multiple sql widgets.

And preparation looks like this

Obviously data is too much and slows down the page. So we thought of adding pagination.

It is custom component. These are properties 

On refresh it does not go to next page. I know data needs refresh. But preparation has only sever action.  My refresh looks like this

In this case, and I am Supposing you have the queries inside of the action well implemented,you need to the same actions that are in the preparation, like this


Gonçalo Almeida


Hi @Albatross 

You need to refresh the query also

Regards

Gonçalo Almeida

Thank you for your prompt response.

This preparation as above in screen shot has server action containing data. So how to refresh data in this case

In this case, and I am Supposing you have the queries inside of the action well implemented,you need to the same actions that are in the preparation, like this


Gonçalo Almeida


I made the changes as per your suggestion. It's not fetching data for second page still

The data that is coming from the action is coming as expected?

Debug the app and try to un derstand where is the problem.

Gonçalo Almeida

The problem module is taken as dependency in another module.

There is no way to debug it.  Or I don't know how to

Champion

Hi Albatross,

If you are not using aggerate as the data source, Such as in this case you use a list as the data source, Then the pagination will not work automatically. You have to implement the logic by yourself.

Sorry, I don't know what is the best way to do this.

Kind regard,


In this post you can find how to include pagination using a SQL:

https://www.outsystems.com/forums/discussion/56770/sql-offset-and-os-pagination/

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