Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

hkg_qlik
Contributor II

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

Re: Applymap

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

Re: Applymap

'FIRST_NAME'

Re: Applymap

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

Re: Applymap

I am using FIRST_NAME it was a typo.

I think so its not handling string value for comparison.

MVP
MVP

Re: Applymap

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

];

Community Browser