Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Apply Map function Issue

hi experts ,

I am trying to map 2 table with the help of apply map function ,  but there seems to be a very minor issue which i am not able to recegnize it ..

please help me know if i have taken the right approach ::

below is the code which i am implementing.

Mapping LeaseType:

LOAD ID as LeaseTpeId,

    Value;

SQL SELECT *

FROM mdm.LeaseType;

Lease:

Load id as LeaseId

      ,Parentid

      ,orglocationid

      ,leasenumber

      ,leasecategoryid

      ,LeaseTypeid

      ,ApplyMap('LeaseType',ID) as Value

      ,leasestatusid

      ,isstandardagreement

      ,languageid;

sql select * from lms.Lease;



below mentioned is the error :


Feild ID not found.


Kindly help on where is the issue.


Thanks in advance,'

CG

1 Solution

Accepted Solutions
bvssudhakar
Creator III
Creator III

Hi Chandana,

Once check the Column name spellings and try

View solution in original post

6 Replies
Anonymous
Not applicable
Author

i suppose that field "ID" doesnot exist in your source.

so you may use LeaseTypeid as Input

  ,ApplyMap('LeaseType',LeaseTypeid) as Value

maxgro
MVP
MVP

if you want to use ApplyMap,

you need a

mapping load


Mapping LeaseType:

Mapping LOAD

    ID as LeaseTpeId,

    Value;

SQL SELECT *

FROM mdm.LeaseType;

lanlizgu
Creator III
Creator III

Try:

LeaseType:

Mapping LOAD

    ID,

    Value;

SQL SELECT *

FROM mdm.LeaseType;

Lease:

Load id as LeaseId

      ,Parentid

      ,orglocationid

      ,leasenumber

      ,leasecategoryid

      ,LeaseTypeid

      ,ApplyMap('LeaseType',ID, null()) as Value

      ,leasestatusid

      ,isstandardagreement

      ,languageid;

sql select * from lms.Lease;


If you continue having the same error it is because you don't have an ID field... If so, which is your field name?


Thank you.

bvssudhakar
Creator III
Creator III

Hi Chandana,

Once check the Column name spellings and try

Anonymous
Not applicable
Author

Thanks a lot Sudhakar , my column name spellings were incorrect.

pooja_prabhu_n
Creator III
Creator III

Hi,

Try 'id' instead of "ID" in the Applymap function

LeaseType:

Mapping LOAD ID as LeaseTpeId,

    Value;

SQL SELECT *

FROM mdm.LeaseType;

Lease:

Load id as LeaseId

      ,Parentid

      ,orglocationid

      ,leasenumber

      ,leasecategoryid

      ,LeaseTypeid

      ,ApplyMap('LeaseType',id) as Value

      ,leasestatusid

      ,isstandardagreement

      ,languageid;

sql select * from lms.Lease;