Skip to main content
Question

Filter parent records within child record grid edit based on other parent selection

  • June 28, 2023
  • 0 replies
  • 243 views

Hi all, I've implemented solutions similar to this in the past (filtering child records based on grid edit overrides & forms, etc), but I'm really struggling to figure this one out. Here's the scenario:

I've got a table "jobs", which is a child table of "venues". On the Jobs form, I need users to be able to select an on-site contact from a list filtered based on their selection of a grandparent "venue" record. 

Currently, I've got a table "contacts" which is a child of "venues". I've created an intermediary relationship table "on-site contacts" which is a child of both "jobs" and of "contacts" to connect the two. I've tried adding a grid-edit child record report of "on-site contacts" to the jobs form, and attempted to filter it so that it only shows records in which "contact-related venue" is equal to "job-related venue", but with the grid edit report, job-related venue does not populate until the form is saved and the child record is officially created. 

Does anyone have a solution to accomplish something similar? I suppose I could flip the relationship and try and make on-site contact a parent of jobs, but I'd like for users to be able to add multiple contacts as needed. 

Thank you! 


#Gridedit #Search #filters #Many-to-Many 
------------------------------
Elena Larrabee
------------------------------

  • Author
  • Quickbase Alumni
  • July 12, 2023

I'm also trying to implement something very similar without much success in another area of my app. I've got a table "Inventory", a table "Sub-Inventory", and a merge table between them so as to give them a many-to-many relationship. (One inventory item can implicate the use of many sub inventory items, and one sub inventory item can be implicated in the use of many master inventory items). 

"Inventory items" is a parent table to "Pull list items", which is in turn a parent to "Sub Pull List Items", which is a child of a separate inventory table "Sub-Inventory Items." See relationship diagram below: 

What I'm trying to accomplish is a scenario in which a user can add additional Sub Pull List child records to a parent Pull List Item record, each with a parent Sub Inventory Item record. However, I don't want the user to have to scroll through every single Sub Inventory Item record; I want the possible parent Sub Inventory Item records to be filtered by matching the parent Inventory Item category (which is fed down to the Sub Pull List item child via its parent Pull List item).

The issue I'm running into is that I can't figure out a way to dynamically filter the report used for my grid edit override form on the "Sub Inventory Items" table by a value on a child record (the "Sub Pull List Item" record).

I've got a pipeline set up that automatically adds Sub Pull items to each Pull item and selects the appropriate parent Sub Inventory item based on the relationships defined between master and sub inventory in that merge table. But, I still need users to be able to add and edit additional sub pull items without having to search through every single sub inventory item every time. 

Does anybody have any ideas on this? Or know when QB plans on implementing type-ahead search in grid edits so I can completely avoid this whole thing? Haha.



------------------------------
Elena Larrabee
------------------------------