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?

mvp_badge
MVP
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

João Marques wrote:

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

 

  Thank you soo much João Marques. It worked for me !!

mvp_badge
MVP

Hi Kavya,

Look this post.

Maybe help you.


Regards.

Agno Silveira wrote:

Hi Kavya,

Look this post.

Maybe help you.


Regards.

 Thanks Agno Silveira

 

Champion

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 

Amit Verma wrote:

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 

 

 Thanks Amit Verma. My functionality was to load data on button click only.

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

Sourav Pasari wrote:

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

 

 Thank you for the time and effort Sourav Pasari.

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