3 Replies Latest reply: Mar 31, 2017 3:13 PM by Muñoz Héctor RSS

    Using a field (calculated) from one table in another table

    Archana P

      Hello:
      I am trying to use a calculated field from one table in another table.

      I tried to use ApplyMap() by Mapping JobCode. It didnt work ... I might've not done it the right way. What is the correct way to do this?


      Basically below is my sample table structure and the logic trying to use.

       

      Please help. THANK YOU.


      Table1 -

       

      Actives:

      LOAD

      EmployeeID,

      JobCode,

      ManagerLvl,

      IF([JobCode] = '0','Yes',

      IF([JobCode]='2','Yes',

      IF([JobCode]='9' AND [ManagerLvl] = '8', 'Yes',

      IF([JobCode]='9' AND [ManagerLvl] = '9', 'Yes',

      IF([JobCode]='9' AND [ManagerLvl] = '10', 'Yes','No'))))) as "Mgr_Agr_Required"

      FROM

      Actives.xls (biff, embedded labels, table is Detail$);

       

      Table2 -

       

      Agreements:

      LOAD

      EmployeeID,

      Name,

      Promotion_Dt,

      Mgr_Agr_Dt,

      IF(Mgr_Agr_Required='Yes' AND [Mgr_Agr_Dt] = IsNull(),'Non-Compliant','Compliant')) as "Compliance Status"

      FROM

      Agreements.xls (biff, embedded labels, table is Agreements$);

       

      Thank You.

      Regards,
      Archana