combobox from valuelist returns incorrect values

Hello all,

Using Servoy 6.0.4

I have a combobox that has a table-based valuelist as the source. The returned value does not always reflect the correct data from the table.

If the Primary/Identity field from the table is not included in the display text, and multiple options display the same text, these similar items are assigned the value of the first option.
example: a table has multiple entries ‘name’ = ‘home’, but each have a unique primary/identity field (integer), the first being, say, 12.
each option in the combobox that displays ‘home’ will return a value of 12, not the unique field associated with that table row.

If the primary field IS included in the display text of the combobox, each separate item returns the correct value.

Any hints as to why this occurs? Servoy does recognize the primary field of the table. I also understand that multiple selections with the same text and different values is not a user-friendly design; I am just trying to migrate an application from VFP to Servoy.

Thanks in advance to all for your time and expertise.

That’s quite obvious, I think.

If you have this

value id
home 123
home 456

and the popup will show “home”. So what value should it return? It does a text match and the first match is used. In any case, this is a problem from the design side. How should your user know what “home” to select? If there is no difference between the two “home” entries, remove one. If there is one, make sure your user knows what he selects.

Obvious?

I understand (again) that this is a design issue. I can correct that easily…

My question is why do the display items select correctly from the table, but get incorrect values. Text-match the value with the display text? Why not select the value at the same time as the display text, so that they are applied correctly?