This content has been marked as final. Show 3 replies
creating a script to solve thread 114112, I experienced an issue with the ApplyMap function:
FieldMap: Mapping LOAD * Inline [ 0, <none> 1, COUNTRY 2, YEAR 3, BRAND 4, Model 5, Contidion 6, Delivered ]; tabOutput: Generic LOAD %RecordID, ApplyMap('FieldMap', IterNo()), SubField(SubSTR, '|', IterNo()) While IterNo() <= SubStringCount(SubSTR, '|')+1; LOAD AutoNumberHash128(COUNTR, SubSTR) as %RecordID, COUNTR&'|'&SubSTR as SubSTR Where Len(SubSTR)>0; LOAD COUNTRY as COUNTR, SubField(STR, '~~') as SubSTR FROM [http://community.qlik.com/servlet/JiveServlet/download/507618-101744/Sample%20file%20for%20test.xlsx] (ooxml, embedded labels, table is INPUT);
The ApplyMap didn't work for value 1 (COUNTRY) unless I added a value 0 in the mapping load.
(To reproduce just delete row "0, <none>" in the mapping load)
Any ideas why ApplyMap behaves like this?