selecting value from a child table

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered
I am using an input type for a field with a view to allow the user to look up and select from another child table a value matching the parent. So in my example I have parent projects table and have to two child tables, design stage, and approvals. In approvals, I need the user to select a design stage relevant to the approval for a given project.

Currently it is looking up almost all values existing in the design stage table. What is the best way to achieve this?
Photo of Arshad Khwaja

Arshad Khwaja

  • 3,152 Points 3k badge 2x thumb

Posted 3 years ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,664 Points 50k badge 2x thumb
So do I assume that you have master table of selections for the drop down choices for Approvals and that each Approval choice has many Design Changes Choices?

If that is the setup, then when you are entering a project, you will have a field called [Related Design Stage].  Look at the field properties for that field and look for the checkbox for
"The values in this field depend on a selection in another field" and you will be able to set that to only look for Design Choices where they match the same [Related Approval] as was selected on the Project record.
Photo of Arshad Khwaja

Arshad Khwaja

  • 3,152 Points 3k badge 2x thumb
Thanks. There is no direct relationship between design stage and approvals. These are sibling tables. Would your suggestion be still relevant?
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,664 Points 50k badge 2x thumb
maybe you need this structure:
One Project has many designs.
One Approver has many designs.

So when you are creating a Design, you would also select a from a drop down list of the Approvers.

The project record could still have a report link field of all the Approvers, as the Approvers would know the related record ID of the project, via a lookup from the Design record.
Photo of Arshad Khwaja

Arshad Khwaja

  • 3,152 Points 3k badge 2x thumb
Thanks. But in real life one design stage cannot have more than one set of approval. Are you saying that I should still set it up? Mine is a simple structure where a project has many design stages and a project a set of approvals.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,664 Points 50k badge 2x thumb
Re:"But in real life one design stage cannot have more than one set of approval. ".

What do you mean about a "set of Approvals".  Are you just choosing a single Approval Choice for each Design?  if so, then I'm suggesting what would look to the user like a multiple choice field on each Design record as to how it will be approved.
Photo of Arshad Khwaja

Arshad Khwaja

  • 3,152 Points 3k badge 2x thumb
No you are mixing up projects with design stages. Projects table is parent to design stages and approvals. I am trying to look up relevant records in approval table from design stage via projects.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,664 Points 50k badge 2x thumb
Sorry, I am not understanding.  I think that you will need to help me understand with an example.
Photo of Arshad Khwaja

Arshad Khwaja

  • 3,152 Points 3k badge 2x thumb
OK I have a project which is to build a supermarket. To do this we have to design it. There are several design plans done on a project. So this is one to many. On the other hand we have several approvals required for a project in its life. So that is another one to many. For some approvals, we need to supplement the info as to what was the design plan used that led to certain approval. So I merely want a drop down in the approvals table to be able to select the right design plan against each.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,664 Points 50k badge 2x thumb
So,
One Project has Many Design Plans.
One Project has Many Approvals
One Design Plan has many Approvals.  ie the Approval(s) required arise out of a Design decision.

When you are on the Approval record and are Selecting [Related Design], you will want to only see a drop down list of the of the Related Designs for that Project.  So that means that the [Related Design]  for the Approval is conditional on first having selected a [Related project].

So edit the field Property for the [Related Design] field and set it to be Conditional. on Related Project matching Related Project.

If that works, let me know and I will switch this to be an Answer.
Photo of Arshad Khwaja

Arshad Khwaja

  • 3,152 Points 3k badge 2x thumb
Thanks. I was merely uing a field in approvals to look up design stages but looks like I will have to create a relationship between approvals and design stages to do what you have suggested.