How do I create a field in a parent table that displays a related record from a child table based on a checkbox being true in the child table?

  • 0
  • 1
  • Question
  • Updated 4 years ago
  • Answered

I have a parent table called 'Clients' and a child table called 'Employees'. In the 'Employees' table, I have a checkbox field called 'Client Contact'. I want to be able to display the name of the employee on the 'Clients' form/report whose 'Client Contact' checkbox is checked (true) .

Photo of John

John

  • 0 Points

Posted 4 years ago

  • 0
  • 1
There is a Report Link field which QuickBase Created for you on the left side of the relationship.  It is Probably called Employees.  If you add this to your Parent Client form and set the Form to show the records right on he form it will show a report of all client Employees.

But then you can create a report of just all employees where the checkbox is checked, (but lists all contact employees for all clients).  

Then if you set the from properties to use that report, it will give you an embedded report of just the employees for that client who are flagged as being the client contact.
Photo of John

John

  • 0 Points
Hi Mark, thanks for the response. I am not looking for a report that lists all of the contact employees. I would like a single field that lists the one employee designated (checkbox is checked) for that one client on the client form.
My solution will give you an embedded report of just the one employee who is the contact for that client.
Photo of John

John

  • 0 Points
Thanks but I do not want a report. Is it possible to create a field that will display it?
Photo of John

John

  • 0 Points
I tried using this technique but it doesn't work because the maximum Record ID cannot be used. It is not the latest record that I am selecting/filtering. I need to filter based on a checkbox. Each Client (parent table) has one Employee (child table) who is designated as the 'client contact' in the 'Employee' table and that is done by checking the 'client contact' checkbox.
Sorry, I left out a step.  Add a filter to the summary field to get the maximum record ID subject to the filter that the checkbox is checked.  Then you will get the most recent one which is flagged as the contact.
Photo of John

John

  • 0 Points
Not sure how this works since there isn't a "maximum" record for the 'client contact' field. The record ID's in the table are assigned to the employee and I am not looking for the maximum (highest) employee record ID #; only the employee who has the 'client conact' checkbox checked. Only one employee will be the 'client contact'. Can you explain how this works?
Every QuickBase record is assigned a unique sequential record id# (per table). So suppose the contact record has a Record ID of 1234 and its flagged as being the client contact.  The Maximum Record ID of ALL the records for that client, flagged as a contact is 1234.  There may only be one, but it's still the Maximum.