Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
BryanV
Contributor
Contributor

Can you store a column that is not in the load script? Blank columns & pre-populated columns?

I have a load script that has two columns.  In the load script, I'm identifying items that meet certain criteria.  What I'd like to do is output a csv that includes columns that are not part of the load script as the user will need a certain gap between the columns that are in the load script.  Ideally, some of those columns would be pre-populated with a fixed value.  I'm envisioning something like this:

Part_List:

Load

[Part #],

[Price]

From [C:\Parts List.qvd](qvd);

Store

[Part #],

'Yes' as [Decision],

'' as [Variable Column],

[Price]

from Part_List into [C:\Part_W_Variable.csv](txt);

 

The two red bits of the store function cause an issue.  I can't store them because 'Yes' and '' aren't recognized as fields.

The current workaround is to create those columns in the Load portion of the script, then store them.  Is that my only solution?  My "issue" with that solution is that there are roughly 100 additional columns that need to be in the stored file that do not exist in the data that I am loading originally.  This is due to a formatting requirement of a tool further downstream (i.e. the 'Price' needs to be in column #4 with two columns between it and 'Part #'). It seems redundant to load the columns that aren't there, then turn around and store them. 

 

The basic question is - can I create columns in the Store portion of the script and, if so, can I have them pre-populated with a value?

Labels (1)
  • Other

1 Reply
marcus_sommer

AFAIK it's not possible to store not existing fields within the store-command else they must be already included within the load. IMO there would be no significantly difference in regard to the needed efforts and performance for such a task - if both methods would be possible.

- Marcus