Discussion Board for collaboration on QlikView Scripting.
I would like to use ApplyMap by the FieldName, to some fields.
ApplyMap('Map_FieldCode', FieldName(nr ,'TableName'))
Is it possible?
I thought of using a loop, but something is going wrong while trying to create the new table.
LOAD Distinct PurchOrder_LineID,
from $(vQVDPath)PurchOrder.QVD (qvd)
Where PurchOrder_Flag_IsClosed =0;
LET NF = NoOfFields('OpenPurchOrder');
LET NR = NoOfRows('OpenPurchOrder');
FOR I = 1 TO $(NR)
FOR J = 1 to $(NF)
can you explain what are you trying to accomplish, in simple words? Are you mapping field names or field values? how does your mapping table look like?
Upgrade your Qlik skills at the Masters Summit for Qlik - coming to Boston, MA this October!
I'm trying to map a value by the QVD field name:
Sorry, still missing the point... Maybe if you describe your source data and the desired result, it could become clearer...
Yes, I realize that...
This is the base table:
I would like to link metric code to some of the fields.
The mapping is based on the field name.
Otherwise, i have to write it in the script:
LOAD PurchOrder_LineID as Tmp_LineID,
PurchOrder_No as Tmp_PurchOrder_No,
2 as Tmp_MetricCode
Where Year(PurchOrder_Line_DepartDate) =1988;
3 as Tmp_MetricCode,
Where Year(PurchOrder_Line_SupplyDate) =1988;
You can try something like the below
Let vMetriccode = '1,2,3';
subfield('$(vMetriccode)',',') as Tmp_MetricCode
And then use applymap on Tmp_MetricCode
Sorry for my late response...
Please note that for each metric I check another field (DepartDate, SuppluDate, etc..)
So i'm not sure how i should apply your solution.