List Box doesn't set Selection Attribute

Hi everyone,

i'm new using OutSystems and i'm facing one strange issue (at least for me!).
I'm populating a List Box with a record list i've created! The values are shown correctly!

But i need to populate another list box with some values depending on the first one... So i made an action to do that after selecting one value on the list box.

The issue i'm facing is that the value on the Structure's "Selection Attribute" is allways false. But the selected value from the structure should be True am i wrong?

It seems that the value is not actualized... Any one can help me?

Thanks in advance,

Pedro Gonçalves
Hi Pedro.

At first, I'm unable to tell you what the problem may be, just from the description.

Maybe you could attach the eSpace you're working on, so that someone could try and investigate further on this matter?

At first, my initial reaction would be to use some OnChange logic on the ListBox that would call a screen action, ending in an Ajax Refresh that updates the second ListBox widget with the information you want...

In terms of the selection attribute, indeed the Selection Attribute for the Record that has been selected should be true. Are you accessing the Widgets' list records, or the preparation's record list - the one you originally use to fetch the data?

If you're already doing all of this, I'd suggest attaching the eSpace to your post, and I'm sure we will be able to help you better!

Best regards,

Paulo Tavares

Thank you Paulo for your quick answer,

the problem was that! I was accessing the record list i used first to fetch data and this was the problem...

Sorry for your time, i really should have realized that...


Pedro Gonçalves
No problem, Pedro!

I can assure you that - as when learning any programming language - sometimes the smallest details can lead to the most frustrating problems :) I'm glad I could help - and please, make sure to keep asking questions. We're here to help!

Best regards,

Paulo Tavares
Yes, you can be sure!

I'll keep asking!

Thank you again,

Pedro Gonçalves
Hi Pedro,

I have same issue, the selection attribute is empty. Can you please explain little more detail, how to resolve the issue.


Hi Sam,

While your question is a bit vague, I tend to agree that the List Box widget is one of the hardest for us to grasp in terms of interaction.

Still, I recommend going through the "About the List Box Widget", "List Box Widget Properties" and "List Box Widget Runtime Properties" help documents, since they might help you understand its behavior better. Finally, though a bit of a tangent here, the "Filter Data with a Combo Box" how to might also help you.

Let us know how if this helps.


Paulo Tavares
Hi Paulo,

I know it is hard, I read your links and still trying to make it work. Let me list the steps, what i'm doing, So let me know what is missing!.

objective: populate the lookup table values to list box and save the selection into a middle transaction table.

1) On Page preparation, added a query list (GetLookupTableValues)
2) Inserted List box widget
3) Assigned "Source Record List" as "GetLookupTableValues.List"
4) Assigned "Source Attribute" as "LookupTableValues.TypeId"
5) Assigned "Selection Mode" as "Multiple"
6) Selection Attribute is empty, no values available to select.

After this, I will have to store the user selection into transaction table and retrieve for edit.

I searched for samples on the forum, please let me know, if any post already there.

I'm not sure I got the scenario correctly, but if I got it correctly, try the following:

In the query, add to the Entities/Structures a structure with a single Boolean attribute (it might be already created, by default, in your eSpace, a Boolean structure).

Make the Selection Attribute be the boolean attribute in the Boolean structure.

In the screen action after the user submits the data, that boolean value should be set to true in the records that the user selected.

Let me know if this helps, or if there's something in my - admittedly brief - explanation that isn't clear or immediate. I'm doing this by heart, so probably I may be leaving out some important detail :)


Paulo Tavares
Hi Paulo,

Thanks. By adding a Boolean Structure into my Query set, I was able to choose Selection Attribute as "Boolean.Value" and do see the lookup values in the list box.

As you can see in the attachment, I created flow to save List box selection into the database. But, having some issue on edit page list box object to highlight the item which was strored on the middle table.

let me know if you any suggestions or above information's are not clear!


Hi Sam,

I'm not sure what you are trying to achieve, but if I have understood correctly what you are trying to get to, but if you pass the record list with the selection Attribute already set to boolean, doesn't it already show up selected? You might have to iterate through the list, and mark the ones you selected as "true".

Let us know if this helps - or, if I haven't understood your question completely, do send us a screenshot with annotations, maybe that'll help :)

Regards, and good work!

Paulo Tavares