Combobox default value not being set to special value

Hello, I'm using outsystems and trying to set the default value of a combobox. In the screen preparation, I'm creating a list from an aggregate. When I open the site, the last element in the list is the default value even though I have a special value set to -1 called "- Select -". I've set the default value many times before but never with a list I created in the preparation so I assume that has something to do with it.

I attached an oml. Just create a test address and you'll see the issue.



The problem is that you are not setting the value of the AddressTempId in RCApplicantAddress. So, it is being stored as 0 (NullIdentifier()) in each item of your local list.

As the variable bound to the combo have, by default, the value 0 (NullIdentifier()), the combo box is selecting the last value with 0, that is the last value of the list.

Give ID's to the records you are storing in local list (that you give as source to the combo box), and it will work as expected (showing - Select - when the value of the variable is Nullidentifier()).

Eduardo Jauch


Thank you! I knew I wasn't assigning the Id because I was working on some other stuff but I didn't think that would actually cause the problem.