658
Views
11
Comments
Solved
Pagination on a List Widget
Question

Hello all,

How can I implement pagination in a list widget?

In my screen I have a list which is populated by a list of structure. The length of this list is of 6, but I want to limit it to 3 per page.

(I have found several ways of implementing pagination in a table that is populated by a list. However, that's not my case. I don't have a table, I have a list widget on my screen).

2023-10-21 19-42-11
Tousif Khan
Champion
Solution

Hello I have fixed it , I have assigned one variable at wrong place now it is fixed

Link -

https://personal-ejuytnht.outsystemscloud.com/Pagination/SampleForList

List_SampleUpdated_and_Fixed.oml
2023-10-21 19-42-11
Tousif Khan
Champion
2022-07-20 14-09-17
Ashutosh Soni

Hi @Catarina Gomes 

You can try this solution

 https://www.outsystems.com/forums/discussion/53909/list-pagination-for-reactive-web/


Hope this helps you

Regard

Ashutosh Soni

2023-08-16 09-51-58
Catarina Gomes

@Ashutosh Soni  @Tousif Khan @Shradha Rawlani all of you sent me solutions of how to paginate tables that are populated with list variables. But what I want to know is how to paginate list widgets. See attached.

Thank you very much.


2022-07-02_09h52_27.png
2023-10-21 19-42-11
Tousif Khan
Champion

Hello @Catarina Gomes

I have created a Sample Oml for you please check

List Widget is used here, and Local List Bind to it.

Sample - Link

Also Check This - https://www.outsystems.com/training/lesson/2042/how-to-add-pagination-to-a-list

Thanks

ListPagination_Sample.oml
2023-08-16 09-51-58
Catarina Gomes

Hello Tousif, I have just opened the sample and seems like it's a bit buggy, I think you are facing the same issues as me. When you first go from page 1 to 2, in the 2nd page you get the same records as in 1. Then you go to page 1, and you only get 1 record, and if you go to page 2 you get more records again. This behaviour is not intended, of course, do you have any idea of what could be causing it?

Thank you.

2023-10-21 19-42-11
Tousif Khan
Champion
Solution

Hello I have fixed it , I have assigned one variable at wrong place now it is fixed

Link -

https://personal-ejuytnht.outsystemscloud.com/Pagination/SampleForList

List_SampleUpdated_and_Fixed.oml
2023-08-16 09-51-58
Catarina Gomes

Hello Tousif, this is working! Thank you very much.

But now I have another issue:

The list that I am displaying is a list of questions: QuestionsList.

So for example, in page 1 I have question 1, 2 and 3; in page 2 I have question 4, 5, 6; and so on.

Some questions are multiple choice questions. For the multiple choice options, I have an aggregate which has 2 columns: the multiple choice option text, and the number of the question to which it refers to (the question is the foreign key).

I need a way of displaying only the multiple choice options that are associated with that specific question.

For example:

In Page 1, Question 2:

A) Good

B) Bad

C) Meh

In Page 2, Question 6:

A) 1

B) 2

This means that I need to filter something based of the QuestionsList that I am showing on the screen. Do you know how to do this?


2023-10-21 19-42-11
Tousif Khan
Champion

Hi,

If you will post the same on another thread, it would be great, Since this is for List Pagination.
Please post new thread so that other can also contribute to it.

Thanks

2023-08-16 09-51-58
Catarina Gomes


Hello Tousif, you are correct, thank you! New question moved to here.

2022-07-20 14-09-17
Ashutosh Soni

Hi @Catarina Gomes 

  I have created a sample oml by using employee data and this is working in my environment

  You can change Default value of MaxRecords value as your need 

  And you can drag and drop the pagination widget in screen

  See this the formet to use pagination in widget tree

Regards

Ashutosh Soni

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