Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
I have below script work fine , except for the red color expression not working :-
MAP_NAME_A:
mapping LOAD RAW,
NAME
FROM
[MAP_A.xlsx]
(ooxml, embedded labels, table is MAP_A);
MAP_NAME_B:
mapping LOAD RAW,
NAME
FROM
[MAP_B.xlsx]
(ooxml, embedded labels, table is MAP_B);
For Each i in 'A','B'
LOAD
COY,
SALESMAN,
'$(i)' as SOURCE,
ApplyMap('MAP_NAME_A',[SALESMAN],'OTHERS') as [SALESMANE_A],
ApplyMap('MAP_NAME_B',[SALESMAN],'OTHERS') as [SALESMANE_B],
ApplyMap('MAP_NAME_'$(i)'',[SALESMAN],'OTHERS') as [SALESMANE],
SALES
FROM
COY_$(i).xlsx (ooxml, embedded labels, table is COY_$(i));
NEXT i;
Hope some one can advise me how to do it ?
I get below error msg :-
Error in expression:
')' expected
LOAD
The final result :-
ApplyMap('MAP_NAME_$(i)',[SALESMAN],'OTHERS') as [SALESMANE],
Remove single quote around $(i). Within a String, if you use $, the variable will be automatically replaced with the value.
ApplyMap('MAP_NAME_$(i)',[SALESMAN],'OTHERS') as [SALESMANE],
Remove single quote around $(i). Within a String, if you use $, the variable will be automatically replaced with the value.