2 Replies Latest reply on Apr 16, 2016 12:44 PM by unclemito

    Can I use a pop-up list in a relationship field?

    unclemito

      Hello,

       

      1. My company works with 20 or so vendors (Maker Field).
      2. A SKU can be shopped around various vendors (Maker Field) until a vendor decides to develop that SKU
      3. So I made a Maker Pop Up List of these 20 vendors for the data-entry person to use to populate that Maker Field of the Design Table when they are inputting and updating SKU's.
      4. I am creating a Maker Table with the vendor info so I want to create a relationship with the Maker Field in the Maker Table as Parent and the Maker Field in Design Table as the Child.
      5. So in the case of vendor changing its Company Name, I would want that name change to propagate throughout the entire database.
      6. Since the data in the Maker Field in the Design Table is coming from the Maker Pop Up List, will the data in Maker Field in Design Table update with the name change in the Maker Field in Maker Table?

       

      Regards

        • 1. Re: Can I use a pop-up list in a relationship field?
          erolst

          No, it wouldn't change, since you're only inserting a text into a field. The value list will change, but that isn't reflected in the field

           

          Rather than insert a name into Design, you should use key fields in both tables – a primary key in the Maker table and a foreign key in the Design table.

           

          Create a value list that has 1. field: Maker::primaryKey, 2. field: Maker::name, show second only.

           

          Format the foreign key field in Design as a popover with the value list.


          Select a name from the popover – and you're actually inserting a key that resolves (thanks to the popover) into the appropriate name from the value list. If you change the name of a Maker, it will also change in all Design records where its key it used.

           

          Note that so far all this works without any relationships; but usually you will want to create a relationship based on

           

          Design::foreignKeyMaker = Maker::primaryKey

           

          so you can display other fields from Makers in a Design context, e.g. an address on a PO, and create statistics, e.g. how many Designs for a given Maker.

          • 2. Re: Can I use a pop-up list in a relationship field?
            unclemito

            Thanks for your help answering my Question.

            Reworked my Database and everything seems to be working.

            Had to review the tutorials again to make sure I got everything in your reply.