2 Replies Latest reply on May 27, 2011 12:13 PM by yuichim

    Getting related field name?



      Getting related field name?



      I am working on a sales order solution that has following tables.

      1. Order table, Order Items table, Products table.

      In Order Items table, kf_productID is related to kp_productID in Products table.  There also is a productName field in Products table.

      What I am trying to do is : I created a field called ProductName in OrderItems table which is a calculation field to get the product name by looking up the kf_productID in Order Items table.

      I am having a hard time to figure out the calculation...  Is this the best solution for what I want to do?

      Any help much appreciated!

        • 1. Re: Getting related field name?

          No need for the field. Just add the Products::ProductName field to your Order Items portal row or layout. When you enter or select a value in kf_productID, the product name will automatically appear in the Products::ProductName field.

          Note: with this setup, if you edit a Product Name in Products, the ProductName field for that Product will automatically update to match in all existing orders. If you don't want this update to occur (Some businesses prefer not to see past orders update like this), you'd define a text field in OrderItems and use a Looked Up value field option to copy the ProductName from Products into this field.

          • 2. Re: Getting related field name?

            Thank you Phil,

            I used the first option method of just adding the field to the portal.
            So this is what I did:

            In Order Layout -> Created Order Items Portal -> added Products::ProductName field in portal.
            The product name is definitely showing up.  It is all working now.

            Thank you!