Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, while I'm loading a table I use ApplyMap to add a new field this way:
ApplyMap('MapGestSuppliers',LotNumber,Null()) AS SupplierID,
So I get the field SupplierID, but If I add a second ApplyMap, this way
ApplyMap('MapGestSuppliers',LotNumber,Null()) AS SupplierID,
ApplyMap('Map_CustVendorName',SupplierID,Null()) AS SupplierName
trying to use the first result (SupplierID) in the second mapping It gives an error while loading the table
Field <SupplierID> Not found.
If I can't do this this way, how can I add later another field to the table previously loaded.
Thanks
Hi Pedro,
you cannot use SupplierID field this way, as it is not created yet. You can try with the following:
ApplyMap('MapGestSuppliers',LotNumber,Null()) AS SupplierID,
ApplyMap('Map_CustVendorName',ApplyMap('MapGestSuppliers',LotNumber,Null())
,Null()) AS SupplierName
or create two load statemets, the first one with
ApplyMap('MapGestSuppliers',LotNumber,Null()) AS SupplierID
and the second with
ApplyMap('Map_CustVendorName',SupplierID,Null()) AS SupplierName
regards
Hi Pedro,
you cannot use SupplierID field this way, as it is not created yet. You can try with the following:
ApplyMap('MapGestSuppliers',LotNumber,Null()) AS SupplierID,
ApplyMap('Map_CustVendorName',ApplyMap('MapGestSuppliers',LotNumber,Null())
,Null()) AS SupplierName
or create two load statemets, the first one with
ApplyMap('MapGestSuppliers',LotNumber,Null()) AS SupplierID
and the second with
ApplyMap('Map_CustVendorName',SupplierID,Null()) AS SupplierName
regards
Thanks Krunoslav, I've used the first method and it works for me.