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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Use an include file in the script

Hi all,

Is it possible to use an include file in the script? For example, I have a bunch of reference data which I tend to load into every QV file. I have this already loaded into qvd's so at the moment I just do:


Load *
FROM c:\myFiles\myRefData1.qvd
Load *
FROM c:\myFiles\myRefData2.qvd
Load *
FROM c:\myFiles\myRefData3.qvd


etc. But it would be really nice if I could just put all that in a text file and have something like this in my script:


&include c:\myFiles\myRefData.txt


Can I do something like this?

TIA,

Tony

1 Solution

Accepted Solutions
Not applicable
Author

The syntax for an include is

<h4>$(Include = filename )</h4>


so in your case would be

<h4>$(Include = c:\myFiles\myRefData.txt );</h4>


edit: Michale was quicker on the post button it seems lol

View solution in original post

6 Replies
Not applicable
Author

You can do this:

<pre>
myRefData:
Load *
FROM c:\myFiles\myRefData1.qvd;
Concatenate
Load *
FROM c:\myFiles\myRefData2.qvd;Concatenate
Load *
FROM c:\myFiles\myRefData3.qvd;

Store myRefData into c:\myFiles\myRefData.qvd (qvd);



And after that you can use it in any dashboards like:

<pre>Load *
FROM c:\myFiles\myRefData.qvd;



Anonymous
Not applicable
Author

In fact, there is possibility to use include. It is under Edit menu in Edit Script. Or just type:
$(Include=c:\myFiles\myRefData.txt)

Not applicable
Author

The syntax for an include is

<h4>$(Include = filename )</h4>


so in your case would be

<h4>$(Include = c:\myFiles\myRefData.txt );</h4>


edit: Michale was quicker on the post button it seems lol

Anonymous
Not applicable
Author

Qowboy,
I'm not a quicker qliker, just happend to read it a few min before you... Geeked

Not applicable
Author

Thanks Nick, but I probably should have said that the different RefData files are not related and could not be concatenated.

cheers,

Tony

Not applicable
Author

Thanks Michael (and SQL Cowboy) - that's just what i was looking for.

cheers

Tony