Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
AjithramT
Contributor II
Contributor II

Include in Qliksense

Hi,

I need clarity on this include function.

As per my understanding, this is for load a text file in the load script editor. Correct me if I am wrong.

If yes, then I tried loading this following line,

'$(Include=[lib://DATA/file.txt]);'

It throws an error like, 

'The following error occurred:
Unknown statement: Id,Product 1,A1 2,A2 3,A3 4,A4 5,A5'
 
Do we need to declare a variable before? 
 
Thanks,
Ajith
Labels (1)
1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

The include statement inserts the contents of the file at that point and the inserted data is interpreted as script statements.  Include is not used to add data.  Only the Load statement can do that. 

-Rob

View solution in original post

5 Replies
CurtDaughtry
Partner - Contributor III
Partner - Contributor III

Have you tried without single quotes?

$(Include=[lib://DATA/file.txt]);

AjithramT
Contributor II
Contributor II
Author

Hi @CurtDaughtry,

I wrote without a single quote in my load script. 

CurtDaughtry
Partner - Contributor III
Partner - Contributor III

Did it work?

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

The include statement inserts the contents of the file at that point and the inserted data is interpreted as script statements.  Include is not used to add data.  Only the Load statement can do that. 

-Rob

CurtDaughtry
Partner - Contributor III
Partner - Contributor III

Good catch Rob. I assumed the script was in the text file. But definitely if it is a data file, then a load statement needs to be used to get it into the app.