Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
sourabhsharma
Partner - Contributor II
Partner - Contributor II

error in mapping -ApplyMap error: map_id must be a constant

mapping:
mapping
LOAD Distinct
Managercode ,
Managername

FROM [lib://DataFiles/t_employee.csv]
(txt, utf8, embedded labels, delimiter is ',', msq);


emp:
LOAD
Managercode,
Employeeid,
Employeecode,
Name,
Emailid,
Gender,
applymap(Managername,Managercode)
FROM [lib://DataFiles/t_employee.csv]
(txt, utf8, embedded labels, delimiter is ',', msq);

exit script;

 

2 Solutions

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

It should be like:

applymap('mapping', Managercode) as Managername

https://help.qlik.com/en-US/sense/November2023/Subsystems/Hub/Content/Sense_Hub/Scripting/MappingFun...

Although according to the Load of your mapping table you already have both Managercode and Managername in t_employee.csv. So I'm not sure why are you mapping anything. 

-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com

View solution in original post

sourabhsharma
Partner - Contributor II
Partner - Contributor II
Author

yes It worked now,Actually i was trying to use map on dummy data.

View solution in original post

2 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

It should be like:

applymap('mapping', Managercode) as Managername

https://help.qlik.com/en-US/sense/November2023/Subsystems/Hub/Content/Sense_Hub/Scripting/MappingFun...

Although according to the Load of your mapping table you already have both Managercode and Managername in t_employee.csv. So I'm not sure why are you mapping anything. 

-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com

sourabhsharma
Partner - Contributor II
Partner - Contributor II
Author

yes It worked now,Actually i was trying to use map on dummy data.