Skip to main content
Announcements
Qlik Community Office Hours, March 20th. Former Talend Community users, ask your questions live. SIGN UP
cancel
Showing results for 
Search instead for 
Did you mean: 
wanyunyang
Creator III
Creator III

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
Champion
Champion

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

View solution in original post

2 Replies
francescoreggia
Partner - Contributor III
Partner - Contributor III

In mapping load is important the fields's order.

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

Francesco

YoussefBelloum
Champion
Champion

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