123
Views
7
Comments
Solved
How to filter based on dynamic list
Application Type
Reactive

Edited to add .oml as an attachment.

And sample app: https://personal-qrlqx9g4.outsystemscloud.com/Survey/Survey?SurveyId=1

---

Hello everyone,

I have a screen in which I am displaying a list of questions: QuestionsList (list of structure). This is really a list widget, and not a table.

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. Can anyone help me do this?

The list pagination that I implemented was based on this, so I think that I have to take into account that every time I go to a new page, my QuestionsList is cleared.

Thank you very much!

Survey.oml
2023-03-16 16-29-51
Paulo Rosário
Solution

Hello again Catarina, 

I have modified your oml with a solution. 

Hope it helps! 

Paulo Rosário

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

Hello Paulo, this helped a lot. Thank you very much for your help 😊

2020-08-31 05-04-40
Rahul Jain

Hello Catarina ,

Can you please share OML for more clarity.

Thanks

--RJ--

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

Hello! I have added OML as attachment. And sample app, as well: https://personal-qrlqx9g4.outsystemscloud.com/Survey/Survey?SurveyId=1. Thank you!

2023-03-16 16-29-51
Paulo Rosário

Hello Catarina, 

You can try to encapsulate your logic in a Web block where you pass in your question ID and then filter for the answers for that question creating a list of web blocks that have the current Answer ID as an input.

 This will allow you to keep your main aggregate list with your questions and use that aggregate to see only the answers to the specific question.

Hope it helps! 

Paulo Rosário

2020-11-11 22-46-19
Thiago Andrade

I think that this may help you.

Questions.oml
2023-03-16 16-29-51
Paulo Rosário
Solution

Hello again Catarina, 

I have modified your oml with a solution. 

Hope it helps! 

Paulo Rosário

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

Hello Paulo, this helped a lot. Thank you very much for your help 😊

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