Page 1 of 1

Initial Filter Based on Different Table

Posted: 2022-12-01 17:37
by rpierce
Hello,

I have a table named "Standby" to track time periods of project inactivity. In this table is a lookup field named "Project" which gets the data from the "projects" table. The "projects" table has a field named "active" which is a checkbox for "Yes" or "No". I want to limit the drop down selections in the Table "Standby", "Project" field to those which are active in the "Projects" table.

Thank you again for any help!

Ray

Re: Initial Filter Based on Different Table

Posted: 2022-12-01 17:57
by rpierce
I have tried the following query in the Advanced Lookup options but it doesn't work. It works in phpMyadmin just fine.

Code: Select all

SELECT `project`.`project_id`, `project`.`name` FROM `project`  WHERE `project`.`active` = 1
ORDER BY 2

Re: Initial Filter Based on Different Table

Posted: 2022-12-01 18:48
by rpierce
I found this post and it helped solve the issue.
That bit of information would sure be helpful in AppGini where you're modifying the Lookup Options.