3 Replies Latest reply on Jul 29, 2010 11:15 AM by ShawnAmann

    Display 2 different records from table A on a related table B

    ShawnAmann

      Title

      Display 2 different records from table A on a related table B

      Post

      I have a table called addresses with all the addresses from our organization. 

      On my Purchase order table (Table A)/layout a have a field called billing_address that will use the location names from the address table (Table B) as a value list. After selected I populate a set of merge fields on the Purchase order layout with the street, city etc from the record selected. Thats all good and fine. 

      I want to add shipping address info as well. These addresses come from the same address table (Table B). The problem is that no matter what address I select in my shipping_address field which uses the address location as a value list once again the merge field will still show whats in the billing_address field. 

      Not really sure how to proceed with this. I though about making clone fields for each of the address information e.g steet1 being a calculation field = street. Then use street1 in the merge field for the shipping address to be able to display that. Any other slick ways I might be missing?

        • 1. Re: Display 2 different records from table A on a related table B
          ShawnAmann

          I thought about making clone fields for each of the address information e.g steet1 being a calculation field = street. Then use street1 in the merge field for the shipping address to be able to display that. Any other slick ways I might be missing?

          And so that last idea of mine doesnt work, just duplicates my original problem

          Hmm....


          • 2. Re: Display 2 different records from table A on a related table B
            philmodjunk

            There appear to be a few missing details here. What kind of relationship have you set up linking your Purchase Order table to your Address table?

            If you need to select two different records from the Address table, one for billing, one for shipping, you should have two  distinct relationships from Purchase Order to the Address Table.

            To create separate relationships like this, you'll need an extra table occurrence of your address table. In Manage | Database | Relationships, select the box for the Address table and click the button with two plus signs. This will produce a second table occurrence called Address 2 (you can rename it) that refers to the same data source table as Address. Now you can link one field in Purchase Order to Address for your billing address link and a second field in Purchase Order to Address 2 for your shipping address link.

            • 3. Re: Display 2 different records from table A on a related table B
              ShawnAmann

              Ahh, its the Table Occurrence! That did it.