Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Error using 2 ApplyMap consecutively

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

1 Solution

Accepted Solutions
Not applicable
Author

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

View solution in original post

2 Replies
Not applicable
Author

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

Not applicable
Author

Thanks Krunoslav, I've used the first method and it works for me.