This topic is locked

Lookup table to fill two fields

10/19/2005 12:58:48 PM
PHPRunner General questions
L
little44236 author

I am trying to get linked lookup tables to work. The first lookup gets a "job number" from a table that also has a Client name. The second lookup get the Client name from the same table and is dependent on the job number. The third lookup gets a Contact from a second table and is dependent on the Client name. When I set this up it tests OK but the Contact will not auto fill in the Add page. I can fix it in the edit page where the drop down box is filled.
Can I auto fill the "Client" name so I don't have to do a drop down on it?
Bob Small

admin 10/20/2005

Bob,
cascading linked dropdowns are not supported in the current PHPRunner version. They will work in the next PHPRunner update.

You can modify your generated pages to make them working for now.

Open include\..._functions.php file with a text editor, locate a BuildSelectControl function.

Modify this fragment of code, see my changes in bold:

if($field == "job number")

{

$ilinked = array_search("Client",$fieldlist);

$onchange = "onchange=\"SetSelection('value".$ifield."', 'value".$ilinked."', this.options[this.selectedIndex].value, '', arr_Client);if(value".$ilinked.".onchange) value".$ilinked.".onchange();\"";

}


There is no easy way to fill a text field automatically.

L
little44236 author 10/21/2005

This worked great. Thanks.
Bob Small