Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
EntryTypeMap:
MAPPING LOAD * INLINE [
EntryTypeNum, EntryTypeDesc
0, Purchase
1, Sales
];
ItemLedgerEntry;
Load
dual(ApplyMap('EntryTypeMap', [Entry Type]), [Entry Type]) as [Entry Type Dual],
dual(ApplyMap('EntryTypeMap', [Entry Type]), [Entry Type]) as [Entry Type]
Residend abc;
Any idea?
Regards,
Gerrit
Hi Gerrit,
QlikView will always decide the number formatting of a field the first time this field is loaded. So because of the facts that:
1) QlikView has identified this fieldname with the NUM-format when it first loaded this field.
2) you are reusing this fieldname.
; QlikView will use the NUM-format as the default format for your dual-value. This also explains that when you give the field another name, it does use the TEXT-format as default (as it usually does with dual-values).
Hi Gerrit,
QlikView will always decide the number formatting of a field the first time this field is loaded. So because of the facts that:
1) QlikView has identified this fieldname with the NUM-format when it first loaded this field.
2) you are reusing this fieldname.
; QlikView will use the NUM-format as the default format for your dual-value. This also explains that when you give the field another name, it does use the TEXT-format as default (as it usually does with dual-values).
Not sure about that one, I don't think this is possible. You can however use a renamed field as the inputfield for your applymap.
E.G.:
ItemLedgerEntry;
Load
*,
tt_EntryType as EntryTypeCode,
dual(ApplyMap('EntryTypeMap', tt_EntryType), tt_EntryType) as [Entry Type]
Residend abc;
DROP FIELD tt_EntryType FROM ItemLedgerEntry;
Offcourse this implicates that you do a rename to tt_EntryType on your original load.
Matthias,
Ok, I can achieve that via a workaround.
But I can also live with the renamed field in my original solution, I was just curious.
Thanks again.
Regards,
Gerrit