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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
david_pkma
Contributor
Contributor

ApplyMap for multiple IDs inside one field

Hello everyone,

I have a Mapping Table like:

MapCustomer:

Mapping LOAD ORGID, NAME

Reisdent Customer;

ORGIDNAME
1Name1
2Name2
3Name3
4Name4

And now I have one field like:

FieldName: 1,2,3,4

(Comma seperated IDs inside that one field)

Now I want to load in the loading script instead of the FieldName IDs the actual names.

Something like:

LOAD *,

ApplyMap('MapCustomer', SubField(FieldName,','), null()) as AppliedMap

FROM

Source

And the result should be:

AppliedMap: Name1,Name2,Name3,Name4

It should be dynamic, since the count of IDs can vary.

Of course this does not work but I am really missing the point on how to make it work.

Thank you in advance

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

Why don't you use MapSubString instead

https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/MappingFunctio...

MapSubString('MapCustomer', FieldName) as AppliedMap

View solution in original post

3 Replies
sunny_talwar
MVP
MVP

Why don't you use MapSubString instead

https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/MappingFunctio...

MapSubString('MapCustomer', FieldName) as AppliedMap

sunny_talwar
MVP
MVP

Sample script

MapCustomer:

Mapping

LOAD * INLINE [

    ORGID, NAME

    1, Name1

    2, Name2

    3, Name3

    4, Name4

];


Table:

LOAD *,

MapSubString('MapCustomer', FieldName) as AppliedMap;

LOAD * INLINE [

    FieldName

    "1,2,3,4"

];

david_pkma
Contributor
Contributor
Author

Oh god, it was that simple all along? I really did not find it in the help.

Thank you so much, it worked!