Qlik Community

QlikView Deployment

Discussion Board for collaboration related to QlikView Deployment.

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...

Tags (1)
Labels (2)
9 Replies
MVP
MVP

Re: apply map is not working

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

sureshqv
Esteemed Contributor III

Re: apply map is not working

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

Mapping and ApplyMap Examples

Re: apply map is not working

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

what you are trying to achieve? What is requirement?

MVP
MVP

Re: apply map is not working

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
New Contributor III

Re: apply map is not working

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);

Re: apply map is not working

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

Re: apply map is not working

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.

qlikview_yj
Contributor

Re: apply map is not working

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
Valued Contributor II

Re: apply map is not working

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

Community Browser