This topic is locked
[SOLVED]

 where condition on lookup wizard

12/27/2011 9:28:52 PM
PHPRunner General questions
J
jinex author

can anyone help me, i have create sample master-detail staff_list form, in that form there is a filter search panel with drop down field(staff_name).

the problem is, the dropdown filter search show all staff name, when i clik the master-detail list form.

how to make where condition statement on lookup wizard , if i used on master-detail form ? so the search filter panel, only show staff dependent on department_code in staff_list_detail. i use phprunner 5.3 build 7474
field on master table (department):

id_department , department_code, dept_name

field on detail table (staff):

id_staff, department_code , staff_name
the screen shot, below.


thank you.

J
Jane 12/28/2011

Hi,
you can add WHERE statement on the 'Edit as' settings dialog on the Visual Editortab for your lookup field.

Here is a sample:

"department_code=".$_SESSION[$strTableName."_masterkey1"]
J
jinex author 1/2/2012



Hi,
you can add WHERE statement on the 'Edit as' settings dialog on the Visual Editortab for your lookup field.

Here is a sample:

"department_code=".$_SESSION[$strTableName."_masterkey1"]



hi, jane.
it still not work. is there missing step ? i have added the code as you say.




the table like , below.

Sergey Kornilov admin 1/2/2012

You need to test it in live application. Session variables do not exist when you build your project in PHPRunner.

J
jinex author 1/2/2012



You need to test it in live application. Session variables do not exist when you build your project in PHPRunner.


ok it's work.
i use this code :
"dept_code='".$_SESSION[$strTableName."_masterkey1"]."'"