Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
guruprem
Partner - Creator III
Partner - Creator III

Using Include in Qlik Sense

Hi,

I am using QlikSense desktop in defalut mode (StandardReload=1). However when I use the include statement I am facing the error .

My Script:

$(Include = [lib://Scripts/CalendarSuperFast2014.txt] ) ;

Call Calendar('[Date]');

Here "Scripts" is the Folder Connection Name,  When I load, I am facing the following error

Script Error.PNG

1 Solution

Accepted Solutions
guruprem
Partner - Creator III
Partner - Creator III
Author

Rob,

I got the solution but finding is a little strange i.e we should put "=" immediately after Include statement else QS is not recognizing the Include Statement.

Wrong way to use Include (Leaving the space after Include):

Wrong way to use Include.PNG

Correct syntax is:
Right Way to use Include.PNG

View solution in original post

10 Replies
NareshGuntur
Partner - Specialist
Partner - Specialist

Just interested in finding out why the single quotes are used.

If the argument is text, it will by default take it as a text value.

Hope you would have already trying without single quotes.

JonnyPoole
Employee
Employee

The error suggests its the 'Call' line that is erroring out. I would suggest putting two foward slashes (//) in front of the CALL line to see if it works. Then you will be sure its not the INCLUDE.

reddy-s
Master II
Master II

Hi Guruprem,

What does that the call statement take as input? I believe this is where the issue is.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

This probably indicates that the "Calendar" sub is not found, which means your include is not finding the file.

Change your Include to a Must_Include to confirm the file is found.

$(Must_Include = [lib://Scripts/CalendarSuperFast2014.txt] )


-Rob

http://masterssummit.com

http://qlikviewcookbook.com

guruprem
Partner - Creator III
Partner - Creator III
Author

I am not sure what went wrong but same CALL statement is working fine , when I replaced include statement with actual routine. (I did not change CALL statement)

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

That makes sense. The path to the include file was incorrect or the included file did not include a SUB named "Calendar". When you provided the SUB, the CALL works.

-Rob

guruprem
Partner - Creator III
Partner - Creator III
Author

Rob,

I got the solution but finding is a little strange i.e we should put "=" immediately after Include statement else QS is not recognizing the Include Statement.

Wrong way to use Include (Leaving the space after Include):

Wrong way to use Include.PNG

Correct syntax is:
Right Way to use Include.PNG

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Interesting. I still think you should also use Must_Include as that will tell you when the file is not found.

Anonymous
Not applicable

Thank you, I also had the same problem... you saved me