Forum Discussion

BeckyMoore's avatar
BeckyMoore
Qrew Trainee
5 years ago

LOOKUP FIELDS IN FORMS

I HAVE A INSPECTIONS TABLE AND A  VIOLATIONS TABLE.  I WANT TO BE ABLE TO CHOOSE THE VIOLATION WHEN CREATING A NEW INSPECTION.   HOWEVER, INSPECTIONS CAN HAVE SEVERAL VIOLATIONS.  WHAT IS THE BEST WAY TO SET THIS UP?  I MADE A LOOKUP FIELD FOR VIOLATIONS BUT I DON'T KNOW HOW TO ADD MORE THAN ONE.  OR MAYBE THERE IS A BETTER WAY.

------------------------------
Becky Moore
------------------------------

4 Replies

  • You want to create a relationship where one inspection can have many violations. Then you can add multiple child violation records to an individual parent inspection record.
    Here is what it would look like on a form:

    You can change the settings so that you can add multiple child records from the parent record form:


    Then it will look like this:

    ------------------------------
    Adam Keever
    ------------------------------
    • DonLarson's avatar
      DonLarson
      Qrew Commander
      Becky,

      Do what Adam said.  He has laid out the whole architecture for you.

      ------------------------------
      Don Larson
      Paasporter
      Westlake OH
      ------------------------------
    • RajHelaiya's avatar
      RajHelaiya
      Qrew Captain
      Thanks Adam, I think this is an easier way to go. But I have a condition, if there are multiple fields in the child table and on the parent table I want to display certain fields based on certain conditions, say if a check box is checked only show 2 out of 3 fields from the child table when add button is clicked on the parent form. How does that work?

      ------------------------------
      Raj Helaiya
      ------------------------------
      • AdamKeever1's avatar
        AdamKeever1
        Qrew Commander
        You would need to use dynamic form rules in the form settings:

        You may need to use a formula field to compute a result for multiple conditions and then apply a dynamic form rule to that formula field depending on exactly what it is you need to do.


        ------------------------------
        Adam Keever
        ------------------------------