Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
chandana_gowdar
Contributor II

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
Contributor II

Re: Apply Map function Issue

Hi Chandana,

Once check the Column name spellings and try

6 Replies
Partner
Partner

Re: Apply Map function Issue

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

so you may use LeaseTypeid as Input

  ,ApplyMap('LeaseType',LeaseTypeid) as Value

MVP
MVP

Re: Apply Map function Issue

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
Contributor III

Re: Apply Map function Issue

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
Contributor II

Re: Apply Map function Issue

Hi Chandana,

Once check the Column name spellings and try

chandana_gowdar
Contributor II

Re: Apply Map function Issue

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

pooja_prabhu_n
Contributor III

Re: Apply Map function Issue

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;