1
votes

How can I set the combo box special list value to other variable. For example for a combo box I have Value1 0 and Option1 Select. So on a refresh I have to set the Value 1 again to the combo box, sometimes it is having the old selected value. So on a refresh I want to set the variable associated with the Combo box to Value1 0 and Option1 Select.

1
Can you rephrase your question, or give a more meaningful example? I don't understand it.jff
When I refresh a page the combo box should automatically set to the Special list Value1 0 and Option1 Select and not to the old selected value.trx

1 Answers

1
votes

The Combo Box will display the value that is stored on its variable. So if you assign a value to that variable, when refreshing the screen the Combo Box will display it.

Edit

Looks like OutSystems Platform gives more priority to the Variable than the Special Variable.

So if the user selects a value that gets stored on the Variable, and then selects a value that gets stored on the Special Variable, you'll need to assign the Variable with NullIdentifier() for it to stop being displayed.

In this example I have a combo that displays users, and two other options. IDE with combo box

If my Special Variable is set, then I unset the Variable enter image description here

The problem is that if a user selects a value from the Source Entity, and later changes it to a value of the Special List (or the other way around), both variables will be set, and you'll need to decide which variable to unset.

You can use an auxiliary variable for this. On the OnChange event of the Combo box, set that variable to signal if the user chose something from the Source Entity, or the Special List.