Page 1 of 1

Selecting same value in Valuelist

PostPosted: Tue Sep 01, 2009 1:15 pm
by pradiptab
Hello

I have a valuelist attached to a dropdown .
The valuelist is based on database table.
In the valuelist I am displaying a field value and returning its ID.

When there are 2 or more occurances, where the display value is same, the valuelist is selecting the first match of the display value and returns its id.

example:
DISPLAY_VALUE REAL_VALUE
servoy 1
servoy 2
servoy 3

Even you select 2nd or 3rd record always the first record is selected with return value 1.

I dont want to append any other value (like id) to the display value, to distinguish the display value.

So can anybody tell me how to get rid of it?
And is it a bug in Servoy?

Re: Selecting same value in Valuelist

PostPosted: Tue Sep 01, 2009 2:39 pm
by jcompagner
this is currently not supported.
We do search the list for the real id based on the display value.
So the first 1 is found before the next. So that one will always be selected
Maybe in the combo case we could fix this somehow, but for example if you would use that same valuelist on a typeahead this is much harder to fix.

But why have 2 display values that are the same? How can a user select 1 or the other? what is the difference for him?

Re: Selecting same value in Valuelist

PostPosted: Tue Sep 01, 2009 4:46 pm
by pradiptab
Thanks Johan

But I have a situation where I am showing list of doctors names.
On selecting any doctor its appointments are displayed in calendar.
And there may be more than one doctors having same name.
But selecting any name it shows the first matching doctor's name with its data.

Re: Selecting same value in Valuelist

PostPosted: Tue Sep 01, 2009 5:24 pm
by jcompagner
but how do users then know what doctor to select??
the first or the second? Where can they base there decision on?