Combo Box traditional outsystems
I have a screen where I select in the first combo box "Name1" 
then I select the value of the combo box 2 "Test1"
when I select the combo box 1 "Name2" again, for example, I want the combo Box 2 to be cleared by returning to the original state

In my logic I use a local variable "Value" with value zero but it is not working

Trabalho.oap

Hello,

Here's your oml with the necessary changes. What I did:

  1. Created a new "Table2Id" local variable with the "Table2 Identifier" data type.
  2. Bound the new variable to the second combo box.
  3. Changed the OnChange screen action to clear that new variable.

If you want to clear the selection from a combo box, you have to reset the variable it's bound to.

Let me know if you need any additional help.

Trabalho.oml

Hello Fabiano,

I have altered your app so that it has the behavior you want. 

You needed a second variable for your Combobox2 of type Table2Identifier.

If your goal was to have the table2 value depend on the selected table1 value then the table2 static entity has to have a relation with the Table1 Static entry.

However, your Table1 and table2 Static entities are not related. 

Hope it helps!

Paulo Rosário

Tip: share as .oml not .oap its easier :) 

TrabalhoAterado.oml

Thanks for the OML tip, as for the solution I will describe with images what I'm looking for:

In scenario 1 I want to make this selection


In scenario 2 I will select another Name

In scenario 3 it should clear the test field with the result below

Cleaning the last combox

And the oml that I attached has that behavior :) 

Hello,

Here's your oml with the necessary changes. What I did:

  1. Created a new "Table2Id" local variable with the "Table2 Identifier" data type.
  2. Bound the new variable to the second combo box.
  3. Changed the OnChange screen action to clear that new variable.

If you want to clear the selection from a combo box, you have to reset the variable it's bound to.

Let me know if you need any additional help.

Trabalho.oml

I realized that I was pointing to the wrong variable when filling in the null value, thank you all for your help.
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.