Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

wanyunyang
Contributor

ApplyMap

I have a load script with ApplyMap function which I don't understand:

SalesPerson:

Mapping LOAD

    Code as SalesPersonId,

    Name as SalesPersonName

FROM ....;


Customer:

LOAD

    ......

    ApplyMap('SalesPerson',"Salesperson Code",'') as Salesperson_Name,

    .......

FROM.....;


In the ApplyMap function, I know 'SalesPerson' is the name of the map table above. But what I don't understand is, there's no field named "Salesperson Code" in the map table. Why can this script work?


Thanks in advance!


1 Solution

Accepted Solutions
YoussefBelloum
Esteemed Contributor

Re: ApplyMap

Hi,

on the Applymap(), following the description here: https://help.qlik.com/en-US/sense/June2018/Subsystems/Hub/Content/Scripting/MappingFunctions/ApplyMa...

you don't need to have your "Salesperson Code" field named the same on the Mapping table.


you just have "Salesperson Code" field on your Customer table which is sufficient.


so the applymap with "Salesperson Code"  will look at the "SalesPersonId" on the mapping table, values should be the same on both fields, it is the only condition

2 Replies
francescoreggia
New Contributor III

Re: ApplyMap

In mapping load is important the fields's order.

First Field is the key and second field is the description, ever.

Francesco

YoussefBelloum
Esteemed Contributor

Re: ApplyMap

Hi,

on the Applymap(), following the description here: https://help.qlik.com/en-US/sense/June2018/Subsystems/Hub/Content/Scripting/MappingFunctions/ApplyMa...

you don't need to have your "Salesperson Code" field named the same on the Mapping table.


you just have "Salesperson Code" field on your Customer table which is sufficient.


so the applymap with "Salesperson Code"  will look at the "SalesPersonId" on the mapping table, values should be the same on both fields, it is the only condition

Community Browser