19
Views
8
Comments
Solved
Append data to table

Hi All,

i am developing a reactive web application, In the mobile view of the application, I have to initially show 10 data in table by default and then append 10 data every time I click a load more button. Can someone help me with the logic please?

Rank: #93
Solution

Hi kavya,


First you need to have the variables which control the amount of records you are getting and the increment, so you can have two variables which start at 10:


Then on the query binded to the table you have the Max Records = variable MaxRecords defined:


Then when you click the Load More, you just need to update the MaxRecords (number of records you want to show now, so if before it was 10, now you want to show 20) and refresh the query:


See the sample OML attached.


Hope it helps.


Cheers,

João

LoadMore.oml

Rank: #171

Hi Kavya,

Look this post.

Maybe help you.


Regards.

Rank: #137

kavya anbazagan wrote:

Hi All,

i am developing a reactive web application, In the mobile view of the application, I have to initially show 10 data in table by default and then append 10 data every time I click a load more button. Can someone help me with the logic please?

 Hi Kavya,

Please refer below post. This is the same as your requirement

https://www.outsystems.com/forums/discussion/65293/on-scroll-ending-on-table/

Hope this help you :)

- AV

Thanks 

Rank: #370

Hi,

What Ango referred is the best solution. 

Another way you can try that can be used any where (web/mobile). Create a sql widget and add the sql


You need to send the pagenumber and page size

Suppose you r in 1st page and want to show 10 data then

pagenumber = 0, pagesize = 10

 pagenumber = 1, pagesize = 10



pagenumber = 2, pagesize = 10


Now you need increase the pagenumber by 1 when ever you click the button and append the fetched list inside the local list that you will be using in your Record List widget.

Thanks

Sourav