Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
LOCATION_IN:
Mapping Load
SLoc,
Description&'|'&PLANT
FROM [lib://STOCK DEC/location inter.xlsx]
(ooxml, embedded labels, table is location);
LOCATION_EX_RISK:
Mapping LOAD
"Vendor No",
"Vendor Name 1"
FROM [lib://STOCK DEC/location ex.xlsx]
(ooxml, embedded labels, table is Sheet1);
LOAD
"Storage Location",
Vendor,
SubField(ApplyMap('LOCATION_IN',"Storage Location",Null()),'|',2) as [IN],
ApplyMap('LOCATION_EX_RISK',"Vendor",Null()) as [OUT]
UNTIL OVER HERE THE LOAD OK BUT WHEN I INSERT THE BELOW FUNCTION IT IS UNABLE TO LOAD
[IN]&''&[OUT] as [LOCATION]
The field [IN] is an output field and can't be used as an input field in the same LOAD. You can replace [IN] at this point with the same expression used to create [IN], use a preceding load with [IN], or perform a resident load of the table to use [IN].
You will have the same problem with [OUT].
Preceding load pattern:
LOAD *,
[IN] & ' ' & [OUT] as LOCATION
;
LOAD
"Storage Location",
Vendor,
SubField(ApplyMap('LOCATION_IN',"Storage Location",Null()),'|',2) as [IN],
ApplyMap('LOCATION_EX_RISK',"Vendor",Null()) as [OUT]
...
FROM ...
The field [IN] is an output field and can't be used as an input field in the same LOAD. You can replace [IN] at this point with the same expression used to create [IN], use a preceding load with [IN], or perform a resident load of the table to use [IN].
You will have the same problem with [OUT].
Preceding load pattern:
LOAD *,
[IN] & ' ' & [OUT] as LOCATION
;
LOAD
"Storage Location",
Vendor,
SubField(ApplyMap('LOCATION_IN',"Storage Location",Null()),'|',2) as [IN],
ApplyMap('LOCATION_EX_RISK',"Vendor",Null()) as [OUT]
...
FROM ...