Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Talk to Experts, a LIVE Q&A Webinar. Bring your Qlik Sense Business questions on Aug. 4th. Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor

UNLOAD WHEN INSERT COLUMN NEW FUNCTION

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 following error occurred:
Field 'IN' not found
1 Solution

Accepted Solutions
Highlighted
MVP
MVP

Re: UNLOAD WHEN INSERT COLUMN NEW FUNCTION

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 ...

 

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

2 Replies
Highlighted
MVP
MVP

Re: UNLOAD WHEN INSERT COLUMN NEW FUNCTION

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 ...

 

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

Highlighted
Contributor
Contributor

Re: UNLOAD WHEN INSERT COLUMN NEW FUNCTION

thank you for your help