If at first you dont succeed...

… read the manual.

I have been playing with Servoy for awhile now and felt confident that I knew what I was doing.

The first time I added a valuelist to a form, it did not work the way I expected. :(

I was about to post to the forum asking for help, but I decided to look at the manual first.
Lo and behold, there was the answer. The display type for a valuelist can not be TEXT_FIELD. :o
After changing it to COMBOBOX, it worked perfectly.

Hi Bob, it can be a TEXT-FIELD. (make it not-editable)

for example you have column with 0 and 1 values.

create a valuelist like this:

Hi there|0
Hello|1

if you set this valueslist on the field,
0 will become: Hi there
1 will become: Hello

Hope this helps.

Yes, Harjo, it can be TEXT_FIELD but I do not like some of its behavior when it is.

Undesirable behavior:

  1. if I set it as TEXT_FIELD and non-editable, only the first value displays and I can not see/select any of the others. FYI I am using custom values.
  2. If I set it as TEXT_FIELD and editable, I can see the whole list but can only select one of the values by double clicking on it with the mouse button.

Desirable behavior:

  1. tab into the field, use arrow keys on the keyboard to select a value and tab to the next field (I prefer using the keyboard instead of the mouse).

This works if the field is a COMBOBOX. If it is a TEXT_FIELD, no matter what value I select, when I tab to the next field, the first value in the list displays in the field.

Harjo’s tip is good when you show a field that actually stores an ID and you want to display its real value. This is useful in table views or lists when you don’t want users to change the value, but just see it.

Thanks Patrick and Harjo.

The form I was working on was a data entry form and the user needs to be able to change the value but only to a select few options. I do see the value of Harjo’s idea for a stictly display field.

Thanks again.

Try setting the displayType to “TypeAhead”