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: 
Applicable88
Creator III
Creator III

ApplyMap and Mapping within the autogenerated script

Hello,

I want to understand the autogenerated script of another app.

Me personally I like to make my own Load Script but this app only has the main and autogenerated script. There are two lines I don't get what the author intended and where he might did that within Qliksense:

no.1:
Applymap('ordersdeliveryTrackMapping', [Ordersdelivery]) AS [Ord3243522252452]

no.2:

If(IsNull([Type]), 'NOW', APPLYMAP('TypeMapping', [Type] AS [Type_242345525342]

There was no change via "calculated fieldname" or so . the change should be made within the app.

Can someone please explain me these two changes and what they mean?

Thank you very much in advance. 

Best. 

3 Replies
MayilVahanan
MVP
MVP

Hi @Applicable88 

Applymap('ordersdeliveryTrackMapping', [Ordersdelivery]) AS [Ord3243522252452]

<-- Assign the mapping table field values information based on OrderDelivery field in another table

. i.e. vLookUp function in excel sheet

https://help.qlik.com/en-US/sense/September2020/Subsystems/Hub/Content/Sense_Hub/Scripting/MappingFu...

 

2. If(IsNull([Type]), 'NOW', APPLYMAP('TypeMapping', [Type])) AS [Type_242345525342]

<-- If the Type values is Null, then assigning 'Now' values else, assign the mapping table field values based on Type field.

You can re-write like below also

APPLYMAP('TypeMapping', [Type], 'NOW') as [Type_242345525342].

Hope above link gives more detail about Apply map functionality.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Applicable88
Creator III
Creator III
Author

Hello  ,

thank you very much. I read the explanation on the Qlik - Website  about Applymap , but there is a point I don't fully get. 

If that function assings field values to another table it will need a key right? 

My example : 

Applymap('ordersdeliveryTrackMapping', [Ordersdelivery]) AS [Ord3243522252452]

If I put the ordersdelivery fieldname into another one, shouldn't at least a kind of JOIN exist? Otherwise there is no correlation (mapping) possible. 

Thanks. 

 

marcus_sommer
MVP
MVP

Mapping tables are temporary and will be deleted by finishing the script.

- Marcus