Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
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

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

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

- Marcus