Initial Filter Based on Different Table

Discussions related to customizing hooks. Hooks are documented at http://bigprof.com/appgini/help/advanced-topics/hooks/
Post Reply
rpierce
Veteran Member
Posts: 255
Joined: 2018-11-26 13:55
Location: Washington State

Initial Filter Based on Different Table

Post by rpierce » 2022-12-01 17:37

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

rpierce
Veteran Member
Posts: 255
Joined: 2018-11-26 13:55
Location: Washington State

Re: Initial Filter Based on Different Table

Post by rpierce » 2022-12-01 17:57

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

rpierce
Veteran Member
Posts: 255
Joined: 2018-11-26 13:55
Location: Washington State

Re: Initial Filter Based on Different Table

Post by rpierce » 2022-12-01 18:48

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.

Post Reply