Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi i am using the following apply map statement for catching errors;
mission to see if the Item number i am loading from table 2 is exists in table 1 if yest then 'correct', if not then throw an error with text,' incorrect'.
however i only receive 'correct' although i know there is an item in Table2 that does not exist in Table1 - Item.
the apply map statement looks like this and i would like to see that for Item A200 there should be a flag saying incorrect in the layout.
if have attached my document below;
LOAD
if(ApplyMap('Table1',Item,'Error') ='error','incorrect data','correct data') as ErrorflagField;
Table1:
LOAD * INLINE [
Item
A100
B200
C300
];
Table2:
Load * INLINE [
Item, Amount
A200, 100
B200, 200
C300, 300
];
Best
Brad
Bradley
For your ApplyMap you need to have previous created the mapping table with a Mapping Load, see below.
Table1:
Mapping
LOAD * INLINE [
CheckItem, BB
A100, A100
B200, B200
C300, C300
];
Table2:
load
if(ApplyMap('Table1',Item,'Error') ='Error','incorrect data','correct data') as ErrorflagField ,
*
;
Load * INLINE [
Item, Amount
A200, 100
B200, 200
C300, 300
];
Best Regards, Bil
Bradley
For your ApplyMap you need to have previous created the mapping table with a Mapping Load, see below.
Table1:
Mapping
LOAD * INLINE [
CheckItem, BB
A100, A100
B200, B200
C300, C300
];
Table2:
load
if(ApplyMap('Table1',Item,'Error') ='Error','incorrect data','correct data') as ErrorflagField ,
*
;
Load * INLINE [
Item, Amount
A200, 100
B200, 200
C300, 300
];
Best Regards, Bil
Please check the Help file for applymap() function, you need to create a mapping table using MAPPING LOAD before you call applymap.