Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
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

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
Partner

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
Partner

Did it work?

rwunderlich

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

CurtDaughtry
Partner
Partner

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.