I'm a newbie to Qlik environment and am using Qliksense.
I have a requirement wherein I need to lookup values in each column from a table with multiple columns. I tried having the load statement inside a FOR loop and using variables as shown in the code below:
The columns (fields) in the table "temp" are stored in the field 'concat1' in the table "test2". The columns to be used for mapping are "App Seg3" in table "temp" and "Application 5" in table "test2" (both of which have same values).
The tables are somewhat like this
|App Seg 3||aaa||bbb|
I want to add new-column field in test 3 with the output looking as below
The sample code I've written to start with. This is not getting executed when I click "Load Data" button in data editor. Also, I think, I'm reloading test2 multiple times which should not be done. Can you please suggest on how to do this?
Let vNoOfRows = NoOfRows('concat1');
FOR i=0 to $(vNoOfRows)-1
SET vRecordID = fieldvalue('concat1',$(i));
Lookup('$vRecordID','"App Seg3"',"Application 5",'temp')AS Auto_T1
DROP table test2;
Thanks a lot!