If at first you dont succeed...

Share business templates, ideas, experiences, etc with fellow Servoy developers here

If at first you dont succeed...

Postby BobK » Fri Mar 23, 2007 5:24 pm

... 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.
Another Servoy Newbie
Bob
BobK
 
Posts: 18
Joined: Wed Mar 21, 2007 7:29 pm
Location: Cincinnati, Ohio, USA

Postby Harjo » Fri Mar 23, 2007 7:18 pm

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.
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Postby BobK » Fri Mar 23, 2007 8:17 pm

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.
Another Servoy Newbie
Bob
BobK
 
Posts: 18
Joined: Wed Mar 21, 2007 7:29 pm
Location: Cincinnati, Ohio, USA

Postby patrick » Fri Mar 23, 2007 8:19 pm

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.
Patrick Ruhsert
Servoy DACH
patrick
 
Posts: 3703
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany

Postby BobK » Fri Mar 23, 2007 8:59 pm

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.
Another Servoy Newbie
Bob
BobK
 
Posts: 18
Joined: Wed Mar 21, 2007 7:29 pm
Location: Cincinnati, Ohio, USA

Postby bcusick » Fri Mar 23, 2007 10:17 pm

Try setting the displayType to "TypeAhead"
Bob Cusick
bcusick
 
Posts: 1255
Joined: Wed Apr 23, 2003 11:27 pm
Location: Thousand Oaks, CA USA


Return to Sharing Central

Who is online

Users browsing this forum: No registered users and 4 guests