Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

apply map is not working

Team

   I have created the following map.

map1:

mapping load * inline [

x, y

1, one

2, two

3, three ]
;

and used in the text box as

=ApplyMap ('map1', 2)

I could not able to get the output as two. Is this apply map should work in all the Version of QLIKview...

Labels (2)
9 Replies
sunny_talwar

ApplyMap() is only a back-end (or script) function. You cannot use ApplyMap() in front end objects such as text boxes and charts

Chanty4u
MVP
MVP

As sunny said. It is not possible to use in frontend.

Mapping and ApplyMap Examples

Kushal_Chawda

You can use Applymap() only in script, you can't use it on front end.

what you are trying to achieve? What is requirement?

swuehl
MVP
MVP

You can try something like

//No Mapping LOAD

load * inline [
x, y
1, one
2, two
3, three ]
;

and used in the text box as

=Only({<x = {2}>} y)

imrencimen
Contributor III
Contributor III

if u want to use applymap u need two table. first one is has two fields and matched field write first.

map1:

mapping load * inline [
x, y
1, one
2, two
3, three ]
;


Map2:

Load

x,

Applymap('map1',x,'NULL')

field3,

field4

FROM

Map2.xlsx (ooxml, embedded labels, table is Gorevler);

settu_periasamy
Master III
Master III

I think , you tried with Qlikview Help file example..

Capture1.JPG

Just try the below code..

map1:
mapping load * inline [
x, y
1, one
2, two
3, three ]
;

T1:
LOAD ApplyMap ('map1', 2 ) as Field1, // returns ' two'
     ApplyMap ('map1', 4 )  as Field2, //returns 4
     ApplyMap ('map1', 5, 'xxx') as Field3, //returns 'xxx'
     ApplyMap ('map1', 1, 'xxx') as Field4, // returns 'one'
     ApplyMap ('map1', 5, null( ) ) as Field5, // returns NULL
     ApplyMap ('map1', 3, null( ) ) as Field6 // returns 'three'
Inline [ Temp
'']
;


Capture1.JPG

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Apparently, you can use Applymap() in UI objects. The function name is accepted but always returns NULL, even if you supply a third parameter. Which IMHO means that the function isn't even executed, or skips execution on entry.

And in any case, this wouldn't work at all as one of the main properties of mapping tables is that they are dropped at the end of reload scirpt execution. Mapping tables do not survive a reload. Ever.

And based on public knowledge of QlikView settings and options, there is nothing that can be done about this behaviour. Even the easter eggs do not list an option that hints at manipulating mapping table behavior. Sorry.

ysj
Creator
Creator

As sunny said. It is not possible to use in frontend.

ApplyMap() is only a back-end (or script) function. You cannot use ApplyMap() in front end objects such as text boxes and charts

VishalWaghole
Specialist II
Specialist II

As sunny said applymap is back end function.

Please have look on it Apply Map Concept

This will make you clear apply map concept.

Thanks,

Vishal