Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

mapping load

I have below mapping load table

ID ,Text

002 ,text1

2 ,text2

when applymap is applied, it default takes to 2 for even 002. How can I fix it to exact?

1 Solution

Accepted Solutions
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Yes, it works if you observe the rule that only text values are stored, and that QlikView should be blocked from interpreting and passing dual values with a numerical component to search for.

Anyway it shoyuld be easy to figure out what works and what doesn't. I used this code (copied from your post)

MT:

Mapping

LOAD Text(ID) as ID, Text INLINE [

ID, Text

2, Text1

02, Text2

002, Text3

0002, Text4

];

LET vTest1 = applymap('MT', 2, 'NotFound');

LET vTest2 = applymap('MT', '02', 'NotFound');

LET vTest3 = applymap('MT', text('002'), 'NotFound');

to get this result

Mapping Load thread237296 .jpg

Peter

[Edit] Attached the example document to further play with.

View solution in original post

4 Replies
sunny_talwar

May be load ID field in the mapping table using Text() function:

MappingTable:

Mapping

LOAD Text(ID) as ID,

          Text

FROM....

Peter_Cammaert
Partner - Champion III
Partner - Champion III

The reason is that a Mapping Table acts like a symbol table with dual values. Identical numerical values cannot have different text values, just like dual values.

sunny_talwar

pcammaert‌ -

So it won't work even if force Text() function to it? Have not tested what I proposed, but I wonder if you already have tested this or know this for fact.

Best,

Sunny

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Yes, it works if you observe the rule that only text values are stored, and that QlikView should be blocked from interpreting and passing dual values with a numerical component to search for.

Anyway it shoyuld be easy to figure out what works and what doesn't. I used this code (copied from your post)

MT:

Mapping

LOAD Text(ID) as ID, Text INLINE [

ID, Text

2, Text1

02, Text2

002, Text3

0002, Text4

];

LET vTest1 = applymap('MT', 2, 'NotFound');

LET vTest2 = applymap('MT', '02', 'NotFound');

LET vTest3 = applymap('MT', text('002'), 'NotFound');

to get this result

Mapping Load thread237296 .jpg

Peter

[Edit] Attached the example document to further play with.