How to get value in text field based on value from valuelist

Find out how to get things done with Servoy. Post how YOU get things done with Servoy

How to get value in text field based on value from valuelist

Postby hardina09 » Tue May 22, 2012 10:29 pm

In my form, I am having Combo box, obviously values are provided by a valuelist-list of zip codes and textfield,

When user selects a particular zip code then based on zip code selected textfield automatcially get updated with city name corresponding to zip code.

Any suggestions, please reply
hardina09
 
Posts: 62
Joined: Tue Apr 24, 2012 9:46 pm

Re: How to get value in text field based on value from value

Postby dpearce » Wed May 23, 2012 10:43 am

Surely an ondatachange method on the combo box would work to populate the found city value in the second field?

David
dpearce
 
Posts: 469
Joined: Sun Dec 03, 2006 11:53 am

Re: How to get value in text field based on value from value

Postby john.allen » Thu May 24, 2012 2:04 am

I presume this will be a restricted list of zip codes to enter, otherwise I would use a type-ahead text field as there are too many zip codes to make a good combo box. But as David says use the onDataChange event and then either with a query, 'find' or a relation populate the city field.
John Allen
Stanford University
john.allen
 
Posts: 515
Joined: Wed Jul 02, 2003 10:07 pm
Location: Stanford CA USA


Return to How To

Who is online

Users browsing this forum: No registered users and 14 guests

cron