Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
hkg_qlik
Creator III
Creator III

Applymap

Hi,

I am using applymap with string field (Customer Name):

CUST_NAME_MAP:

Mapping Load

upper(trim(firstname)) as First_NAME,

'YES'

from

Customer.qvd

(qvd);

Customer_New:

Load

Customer Alt ID,

upper(trim(FIRST_NAME)) as FIRST_NAME,

ApplyMap('CUST_NAME_MAP',upper(trim(FIRST_NAME)),'NO') as CUST_MEM_FLAG,

from

Customer_new.qvd

(qvd);

Its giving incorrect output.

Thanks,

H

5 Replies
Gysbert_Wassenaar

Is the fieldname in Customer.qvd 'firstname' or should it be 'FIRST_NAME' like you use for Customer_new.qvd?


talk is cheap, supply exceeds demand
hkg_qlik
Creator III
Creator III
Author

'FIRST_NAME'

Gysbert_Wassenaar

Ok, then to create your mapping table you need to use FIRST_NAME too:

CUST_NAME_MAP:

Mapping Load

upper(trim(FIRST_NAME)) as First_NAME,

'YES'

from

Customer.qvd

(qvd);


talk is cheap, supply exceeds demand
hkg_qlik
Creator III
Creator III
Author

I am using FIRST_NAME it was a typo.

I think so its not handling string value for comparison.

swuehl
MVP
MVP

If you say, it doesn't work / giving incorrect output, what does this mean in more detail?

I believe a string value mapping should be possible, seems to work for me:

CUST_NAME_MAP:

Mapping Load

upper(trim(FIRST_NAME)) as First_NAME,

'YES'

Inline [

FIRST_NAME

Stefan

Peter

Thomas

];

Customer_New:

Load

Customer_Alt_ID,

upper(trim(FIRST_NAME)) as FIRST_NAME,

ApplyMap('CUST_NAME_MAP',upper(trim(FIRST_NAME)),'NO') as CUST_MEM_FLAG

INLINE [

Customer_Alt_ID, FIRST_NAME

1, SteFaN

2, Stefan

3, Hanno

4, Tomas,

5, THOmas

];