Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
jmialoundama
Specialist
Specialist

Field not found ApplyMap Qlik Sense

Hi, 

I create a table mapping  from a CSV file : 

MAP_REGROUPEMENT_CODE:
mapping LOAD
"Regroupement code",
Code
FROM [lib://AttachedFiles/Regroupement_ICA_CODE.csv]
(txt, codepage is 28591, embedded labels, delimiter is ';', msq);

 

Then i use table map in a table dimension like this :

ApplyMap('MAP_REGROUPEMENT_CODE',Code,'Code non regroupés') as "Regroupement CODE"

 

I have this error when i load data in script : Field 'Code' not found 

Labels (3)
2 Solutions

Accepted Solutions
jochem_zw
Partner Ambassador
Partner Ambassador

your applymap should be:

ApplyMap('MAP_RGP_CODE',ICA_CODE,'Codes non regroupés') as "Code groupé"

View solution in original post

sunny_talwar

Because your field is called ICA_CODE within D_ACCOUNT_ICA.qvd... you need to use that as your mapping field

[ACCOUNT ICA]:
LOAD ICA_CODE,
            ApplyMap('MAP_RGP_CODE', ICA_CODE, 'Codes non regroupés') as "Code groupé"
FROM [$(V_QVD_Lib_Root)/exact_bi/BRUT/$(V_Country_Code)/D_ACCOUNT_ICA/D_ACCOUNT_ICA.qvd](qvd);
EXIT script;

View solution in original post

12 Replies
sunny_talwar

Do you have a field called Code in the table where you are using the ApplyMap script?

jmialoundama
Specialist
Specialist
Author

Hi, 

No  i have a field which name "ICA_CODE" 

sunny_talwar

Then use that within ApplyMap

ApplyMap('MAP_REGROUPEMENT_CODE', ICA_CODE, 'Code non regroupés') as "Regroupement CODE"

jmialoundama
Specialist
Specialist
Author

I changed the name of the CODE column to DEV in my CSV file.

I reloaded this file in my application and I modified my applyMap this way:

ApplyMap('MAP_REGROUPEMENT_CODE',DEV,'Code non regroupés') as "Regroupement CODE"


I get the error that comes up: Field 'DEV' not found

mfarsln
Creator II
Creator II

Hi,

You should use lookup column as second parameter from your base table, not the mapping table

jmialoundama
Specialist
Specialist
Author

MAP_REGROUPEMENT_CODE is then name of my table map

 

DEV is the column contain differents code

REGROUPEMENT CODE is my key. 

sunny_talwar

Can you share the complete script you are using here?

jmialoundama
Specialist
Specialist
Author

Yes , 

That is my table mapping  (in file xlsx)

[MAP_RGP_CODE]:
mapping LOAD
Regroupement,
Code
FROM [lib://AttachedFiles/Regroupement_ICA_CODE.xlsx]
(ooxml, embedded labels, table is Regroupement_ICA_CODE);

 

[ACCOUNT ICA]:

load
ICA_CODE,
ApplyMap('MAP_RGP_CODE',Code,'Codes non regroupés') as "Code groupé"
FROM [$(V_QVD_Lib_Root)/exact_bi/BRUT/$(V_Country_Code)/D_ACCOUNT_ICA/D_ACCOUNT_ICA.qvd](qvd);
EXIT script;

 

 

jochem_zw
Partner Ambassador
Partner Ambassador

your applymap should be:

ApplyMap('MAP_RGP_CODE',ICA_CODE,'Codes non regroupés') as "Code groupé"