CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Dependent Listboxes - grab their values

Print topic Send  topic

Author Message
tumby1974

Posts: 26
Posted: 02/14/2012, 12:14 PM

I'm trying to use the AJAX 2 dependent listbox example within a record form (instead of a search form) so you can save the listbox selections into the record's table.


however, it's only pulling the id numbers (since the dependent listboxes use the IDs in the bound column to link the listboxes/tables) so my record is only putting numbers (the IDs) into the table instead of the text.

if I make the bound columns the text fields then the listboxes can't link (be dependent on each other)

??
View profile  Send private message
andy


Posts: 183
Posted: 02/15/2012, 6:59 AM

Good database design (cf. database normalisation) means it is a good idea to keep your lookup list in a separate table containing the actual values and only store the id field linking to the table on your form.

In order to display the actual values (rather than the id field) on your form you have a number of options:

* Use a dropdown box that stores the id field value but displays the lookup value

* If using a standard text box or a label (in a report) you can either create a database view that links the table with the lookup table and so provides you with a single data source for your form or report that acutally contains the value or

* again if using a standard text box or a label (in a report) you can base the datasource just on the table (which only contains the id field not its logical value) and use a BeforeShow event to lookup the value from the lookup table. e.g. id field = hidden, create a tag label that displays the lookup value...

Using a view is much easier!
A dropdown box is the ready made solution (storing the id field and displaying the lookup value).

Hope this helps.
_________________
Andy

RAD tools for rich UI controls:
http://www.koolphptools.com
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.