I have a master-detail relationship between 2 tables. I want to edit a field (not the key field), in the detail table using the lookup wizard. I would like to limit my choices in the lookup table to correspond to a field value (not the key field), in the master table. What is the php syntax that I need in the "Where" box of the lookup wizard. Thanking you in advance,
Jack, let Field_lookup is the field in the Lookup table and Field_limit is the field in the Master table. Then enter this expression in the WHERE box in the Lookup wizard settings dialog:
"Field_lookup = ".$_SESSION["limit"]
or this one
"Field_lookup = '".$_SESSION["limit"]."'"
if your field has text format. Build the project.
Open ..._list.php file for details table by any text editor and find the following code snippet: