Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Live Chat, June 29th 10AM ET. Bring your Qik Sense Enterprise, Client Managed questions! REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
wanyunyang
Creator II
Creator II

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
Partner

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

View solution in original post