Can I limit drop down options based on a set of rows in a table?
My app has 3 tables, Projects, Staff, and Assignments. The Assignments table has ref columns to both tables so I can assign as many people to a project as I want. Records in the assignment table are child records of the project.
My issue: Say I have a project A, and I create child records for Bob, then Jim. When I go to add Jim, Bob still exists in my drop down, allowing people to be added multiple times to the same project. Is there a way to not allow that persons name in my Dropdown if they are already in a row that is a cold of the project?
Iโve used valid_if statements to limit drop downs before, but I canโt get the expression to work. I think itโs some combo of select() and in() but I canโt seem to check a list vs a list or tell it to allow all the values except those that exist in a list.
User | Count |
---|---|
40 | |
36 | |
33 | |
23 | |
17 |