2 Replies Latest reply on Oct 21, 2015 6:33 AM by dnechytailo

    Correct relationship for calc field (Lookup function)

    dnechytailo

      Dear all!

       

      I have 2 tables: Companies and Ownership.

      The first contains fields: Comp_Code ... Country ... etc.

      The second contains: Comp_Code, Mother_Company ... Country. First 2 fields lookup company names from the first table (Companies). Country field in the second table is calc field and must lookup country name for Mother_Company based on Country assigned to a company in the 1st table.

      Can you advise on correct relationship between both tables and proper Lookup function script for my calc field?

      Thank you.

       

      Example below:

       

      Table 1: Companies

      Comp_Code  … Country  …

      AAA                          USA …

      BBB               …       USA …

      CCC               …      CAN …

      DDD               …      CAN …

       

      Table 2: Ownership

      Comp_Code  Mother_Company  Country*

      AAA                         BBB                USA

      BBB                         CCC               USA

      BBB                         DDD               CAN

       

      Layout: Ownership

       

      Company:                 BBB

       

      Mother companies:

                                       CCC USA

                                       DDD CAN

       

       

      * - calc field using Lookup function