Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

divyanshi
New Contributor II

can we use self created field in mapping in qilksense???

I mapped a field named XYZ using applymap function.

Now i need to use this field XYZ as a common field in another applymap function.

I am getting an error that field XYZ not found.

Kindly help.

1 Solution

Accepted Solutions

Re: can we use self created field in mapping in qilksense???

Looks you need to use a preceding Load so the field ABC is created before you use it.

spm:

Load

applymap('map2',ABC,null()) as department ,

*

;

Load

ID,

Name,

applymap('map1',ID,null()) as ABC,

from file2;

9 Replies

Re: can we use self created field in mapping in qilksense???

Yup - As long you create the XYZ field before using it.

divyanshi
New Contributor II

Re: can we use self created field in mapping in qilksense???

Kindly explain .

Re: can we use self created field in mapping in qilksense???

Can you post the log file of the failed reload then I can explain in the context of your load script.

divyanshi
New Contributor II

Re: can we use self created field in mapping in qilksense???

map1:

Mapping Load

ID,

XYZ

from file1;

map2:

Mapping Load

P as ABC,

department

from file3;

spm:

ID,

Name,

applymap('map1',ID,null()) as ABC,

applymap('map2',ABC,null()) as department

from file2;

getting error on underlined ABC field.

Re: can we use self created field in mapping in qilksense???

Looks you need to use a preceding Load so the field ABC is created before you use it.

spm:

Load

applymap('map2',ABC,null()) as department ,

*

;

Load

ID,

Name,

applymap('map1',ID,null()) as ABC,

from file2;

divyanshi
New Contributor II

Re: can we use self created field in mapping in qilksense???

is this load within load and in 1 table???

Re: can we use self created field in mapping in qilksense???

Have a look at this Blog Post Preceding Load by Henric and this one by https://www.quickintelligence.co.uk/preceding-load-qlikview/ by stevedark

QlikSense load scripts work the same as QlikView load scripts so the posts are valid for your scenario.

Preceding Loads are very useful and efficient.

divyanshi
New Contributor II

Re: can we use self created field in mapping in qilksense???

Thanks a lot

MVP
MVP

Re: can we use self created field in mapping in qilksense???

Thanks for sharing my post Bill.

I've heard (though not benchmarked) that preceding loads are less efficient in Sense than QlikView, so I avoid them in some cases now.

However... the way they help you to keep your code tidy and remove duplication makes them well worth taking a bit of a performance hit on.