Discussion board where members can get started with QlikView.
Load * Inline [
Applymap('Map_Name',ID,ID) as proname
Here it will return Name if ID Exist in Mapping Table.
Suppose If i pass ID as 3 Which i dont have the Mapping Table, what it will return??
Please help me out this issue...
Thanks in advance.
When you pass ID as 3,your new field will be 3 like ID
load * Inline
The third parameter in Applymap('Map_Name',ID,ID) is the value returned when it doesn't match with the mapping table. Normally we use 'Not available', 'NA' to indicate the missing value but it can be set as per the need.. Thanks.
You do not need to add ID as a third parameter, applymap will use the source field by default if no match is found and the 3rd parameter is not present,
Applymap('Map_Name',ID) as proname,
Applymap('Map_Name',ID, 'Unknown') as proname2,
to see how to use the third parameter in applymap.
In the applymap function if you don't find the matching ID then we have the option to specific what you need to show in such case
Applymap('Map_Name',ID) as proname, if nothing is specified it will return the ID
Applymap('Map_Name',ID,null()) as proname, if ID is missing in mapping table ,this will give null
Applymap('Map_Name',ID,'ID Missing') as proname, this will give a text as ID Missing