Conditional drop down in a join table

  • 1.  Conditional drop down in a join table

    Posted 10-24-2018 17:38
    I feel like I'm missing something obvious since my issue involves two of the most basic structures in app building, the join table and the conditional dropdown.  Hopefully someone can help me out!  My situation is different, but to simplify the description as much as possible I'll use the common Quick Base example for a join table which is a Registrations table that joins a Students table and a Classes table. 

    In other words, when you relate Students and Classes as a one to many to a Registrations table you can click "Add Class" from the student record which would actually bring up the Registrations form with the related student record selected giving you the ability to pick a class and you can just as easily hit a button "Add Student" from the Classes table that brings you to the same Registrations form, but with the class record pre-selected so you can pick a student.  Easy peasy.

    However, let's say that there are so many classes that you want to limit them by a conditional drop down like Departments.  Then, following the Quick base method as I understand it, you would create a Departments table and associate that as a one to many with both Registrations and Classes and make the Classes record picker on the Registrations form a dependent field on the value selected in that associated Departments picker.  Still good - works great!

    The issue is that while this makes sense when picking a class from the student record it breaks down when picking a student from the class record.  When you do that what you get is a blank record picker for the related department even if the class where you originated the request has a department since that relationship has not yet been selected for the registration record.  It looks weird and is confusing and it doesn't seem like it could possible be the best way to do this.

    So, what are best practices here.  I have tried a dynamic form rule to changes the equivalent of the related department to the value in the equivalent of the department looked up from the class record when going in that direction, but I haven't had any luck in getting that to work.  Is there a show and hide rule I can implement here?  Any help is appreciated.  Thanks!