367
Views
3
Comments
How to refresh data of the table
Question
Application Type
Reactive

We all know to refresh data table in client action, we use "refresh data"  from widget but it only can refresh data for "aggregate". It might hard for you guys to understand. To easy to understand, here is situation:

Table like this:

image

But datas get from local variable, NOT aggregate:

imageimage 

I want use refresh data for my search-box and pagination. How to refresh data from local varibale?

imageimage

Please help!




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

Hello Toumtam,

Here is the good post from @Kilian Hekhuis where he had explained very well the pagination, sorting with example. Please refer this.

https://itnext.io/paginating-sorting-and-filtering-data-from-a-data-action-f5cb997fdc60

Thanks,

Sachin

2024-12-10 04-40-04
Gitansh Anand

Hi @Toumtam Phiphack, For this, I would suggest you make two variables of the list type instead of one. One list will hold complete data, and the other will hold filtered data. Then, when your search input or other input changes, you can add desired logic, like a list filter on the list with complete data, and assign the output to the list with filtered data and for pagination, in the "OnPaginationNavigate" action, use a for loop and use the "NewStartIndex" in the "Start Index" input of the for loop, and the "MaxRecords" variable in the "Maximum Iterations" input.

And whenever something in the filtered list variable updates, the screen data will also change.

Thanks
Gitansh Anand

2024-09-12 02-43-38
Deepsagar Dubey

Hi @Toumtam Phiphack 

I have also implemented a case which you shown,

Here you can control everything by the Outsystems List actions, Suppose you have 50 records in your local variable (list type) and in first page you only want to show 10 then create a duplicate or Temp list variable,

For first time append only 10 values  with the help of For loop, then second time clear temp list and start iterating from 11 to 20 records,

Same way you can achieve Sorting by using ListSort action by passing the Column name and pick any order (ASC or DeSC) 

I hop it'll help you.

Thanks

Deep

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