Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Not applicable

Apply Map

Hello

I am trying to do an apply map please tell me how do I use apply map correctly.

Table1:

Load

ID,

Field2,

Field3

;

Table2:

Load

Name,

Field4,

Field5

;

I am trying to do an applymap to map the ID in Table1 to the Name in Table2.

Please suggest applymap code for the above scenario.

Thanks

5 Replies
Highlighted
Valued Contributor

Re: Apply Map

so are you trying to map individual id to a name? applymap needs a mapping load of a table with two fields, first one of which should have the same values as your field in a table so QV knows what field to map with what field and based on which value.

Highlighted
Not applicable

Re: Apply Map

Hello Saradhi

Here let me explain again

Now I have modified it as you told me. Please tell me how to do the applymap now.

Hello

I am trying to do an apply map please tell me how do I use apply map correctly.

Table1:

Load

ID,

Field2,

Field3

;

TableMap:

Mapping Load

Name,

New ID

;

Table2:

Load

Name,

New ID,

Field5

;

Highlighted
Valued Contributor

Re: Apply Map

so in table 2:

load
     Name,

     Applymap('TableMap',Name, 'No ID or 0000') as New ID,

     Field 5,

     . ..

from ....

;

the third parameter is Applymap function is optional and is for instances where there is no corresponding Name value in TableMap. hope this helps.

Highlighted
Valued Contributor

Re: Apply Map

i also noticed that you posted the same issue twice...may have been an unintended mistake...but please consolidate and do not repost.

Highlighted
Not applicable

Re: Apply Map

Hello Saradhi

Here is my code for Table 1, mapping table and table2

Let me know if its correct

Table1:

Load

;

sql select * from T1;

SOBMap:

Load

NAME as ,

SET_OF_BOOKS_ID as ,

;

SQL SELECT *

FROM T2;

SOB:

Load

CHART_OF_ACCOUNTS_ID as ,

CURRENCY_CODE as ,

SHORT_NAME as ,

APPLYMAP('SOBMap',[SOB Name],[SOB ID]) as

;

SQL SELECT *

FROM T2;

Store SOB into SOB.qvd(qvd);