Issues with getting selected values from multi select List Box Widget

Am using multi select listbox widget for selecting multiple item from list .

Listbox widget get populate with data i.e. username, but when i click a button to check what all value is selected  in an screen action, it shows me nothing in the Boolean source.

.OML file attached for reference




IsSlectedBoolean value always show flase


Hi Hriesh,

the sample oml provided is working fine for me.

Where i can see the isselected value is true for selected user.

Regards,

Koushik

Hi Koushik,

Thanks for reply,

Its not working in my outsystem studio.

Did you make any changes.

Can it be any studio specific issue . My Outsystem Studio version is :11.0.510.0


Solution

Hello Hridesh

It is an optimization thing. :)
As you are adding the value to a local (to the screen action) variable that is never really used, the code is optimized and nothing is stored or kept.

If you want to test if it is working, you need to actually use those values.

For example, change the TempBoolen to a string and do the following modifications:


Now you would see something like this in the screen (depending on what you select):

Cheers.

Solution

Thanks Eduardo.

I got it now!!

Hi  Eduardo,

I did the same as you suggested, but the value in the widget itself showing as null data but the length of the list fetched correctly, I have shared screen shot for your reference.

Thanks in advance.

Hi Shyam Sundhar,

Like Eduardo pointed out, all the contents of the ListBox's internal variable that are not used will not be fetched. That would explain how most values on the current record seem to have default values. You say your list's Length is correct, so I'm assuming you can see multiple records while debugging? (position [0], position [1], etc?)