3 Replies Latest reply on Mar 20, 2016 9:41 PM by macwombat

    Table Relationship and Drop-Down List

    MattW_1

      I have an “Import table” and a “Receiving” table. Theirs a relationship between the PO field in Receiving and PO field in Import. That’s the only relationship between tables.

      A user enters a PO number in Receiving, then goes to the Part # drop down list to pick the part number. That works fine.. The issue is after the user picks the part # I need the description and PO Quantity to update based on the part # selected from the drop-down. Both these fields are set to lookup in the corresponding fields in the import table.

      That’s where my confusion comes in because I’m not sure how to have a relationship that when the Part # is selected, the Quantity and Description update. Right now they update on the PO # and then when a user selects a part # they stay stuck on the PO # and not the part # selected after that.

       

      Thanks!

        • 1. Re: Table Relationship and Drop-Down List
          macwombat

          Lookup fields set their value when the record is created and they do not automatically update unless a relookup is triggered.  You would be better off using calculation fields with the calculation set to the corresponding field in the import table.

           

          I'm a bit unsure of your setup though - if you have a relationship between the two tables based on the PO field, what are the different part numbers?  Are they based on a third table?

          • 2. Re: Table Relationship and Drop-Down List
            MattW_1

            So the Part # field is also in the same table as the PO's.

             

            PO                Part #              Quantity

            1234             29-2                       5

            1234             29-5                       7

            4567             30-3                       8

             

             

            User Enters: PO 1234

            Quantity defaults to 5

             

             

            Part # (drop down).. Can pick 29-2 or 29-5

             

            If user selects 29-5 quantity field stays at 5 and doesn't switch to 7

             

            Thanks,

             

            -Matt

            • 3. Re: Table Relationship and Drop-Down List
              macwombat

              With your current setup, even if you have the Receiving::Description set to be a calculation referencing the Imports::Description, it will only ever give you the first value in the related table for the PO.  You need to have another table occurrence that uses both the PO field in the relationship and the Part# field.  That way, when you look across the relationship to set the Receiving::Description and Receiving::PO Quantity it will pick up the correct value from the record that is related by both the PO field and the Part# field.

               

              HTH.  Chris