Make Combo Box Widget Display Value From A Table Instead Of Fixed Listing

I'm creating an editable table. In one of the columns of that editable table, I have a field that I want to make editable using a combo box. I want this combo box to behave like the default "input field" where, the combo box displays the current value from the linked table and upon clicking the combo box, you would be able to change the value to any of the other options provided.

However, I have found that the combo box always displays the first possible value at the top of the list. How can I accomplish this behavior?

Rank: #129

Ok, yes, that might explain it, probably showing the first/default in case zero, not sure ?? But yes, not storing the choice is the source of your problem.

So this is what I said earlier, you don't really need the whole StandardCurrency in your aggregate, so I'd get rid of it, as it is only confusing the matter.  

Or at least make sure that your combobox is bound to EditableTable.List.Current.Company.StandardCurrencyId  and NOT EditableTable.List.Current.StandardCurrency.Id.  

Because at some point you probably call something like UpdateOrCreateCompany, passing EditableTable.List.Current.Company as input.  So at that point, it is of no use to you, that you bound the combobox to EditableTable.List.Current.StandardCurrency.Id.  , you're not doing anything with it.

Rank: #69

Hello Justin,

It is a common mistake, your Combo Box is linked with the Record of the query and not the table, maybe this is your problem.

See the sample oml.


Rank: #129

Hi Justin,

can you show the details of your aggregate ?  do you have the correct join condition ?  Do you have the correct relationship in your database between Company and StandardCurrency.  I would expect your Company entity to have a StandardCurrencyIdentifier attribute, you wouldn't really need to even have your StandardCurrency entity in the aggregate, just that id will do as a column in your editable table.

Maybe look at the aggregate result, and check if you see the correct values there.  Can you share a screenprint of that.


Rank: #41917

@Dorine! Thank you so much for your help, I have taken your suggestions and you are 100% right. After making the changes (more specifically, bounding my combo box to EditableTable.List.Current.Company.StandardCurrencyId and NOT EditableTable.List.Current.StandardCurrency.Id), my combo box is working as I expect it to in the editable table.

Again, thanks! You've saved me a lot of time.