485
Views
5
Comments
Solved
[Chosen] [Chosen] How to get selected values
Question
chosen
Web icon
Forge asset by Miguel Antunes

Hi,

The Chosen Module looks really great. I am trying to use it as a filter on a dashboard. But I just can't get the selected values in the OnChange ScreenAction. Am I missing something?

How do I get the selected values in Outsystems?

2020-02-28 09-46-54
Eduardo Jauch
Solution

Hi Jeroen,

You keep using the combo box and list box the same way as before. So you have the variable where the value is stored or the list, in the case of multi-select list.
In an OnChange you have to see those variables/list.

Can you show a small test where you can demonstrate that you are not able to see the variables/list that stores the result?

Cheers,
Eduardo Jauch

2023-10-31 14-03-45
Jeroen Visschers

Thanks for your answer.

Apparently the values wont show up in the debugger :(.
You need to put them in a variable to see them.

2020-02-28 09-46-54
Eduardo Jauch

Hi Jeroen,

Most of the time, this is due optimization.
If the compiler think you are not using the variables, they are not sent, and than the debugger shows them as if they were empty.

Cheers,
Eduardo Jauch

2023-07-03 14-28-45
Vinicius Seixas

Hello, I know this has kind of been solved.

I have a chosen attached to a list box. The list box is a list of names with a boolean attribute to it called IsSelected. I want to access the selected names that the user chose and use it for something. Where can I find them? I thought the boolean would automatically change once I selected it, but it did not. What to do?

2020-02-28 09-46-54
Eduardo Jauch

Hi Vinicius,

Please, read my comment about the optimization of the list. If you are not "using" the list of the ListBox, it will be optimized and no selection will be kept when sending to the server.

Cheers.

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