Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
guruprem
Not applicable

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
Not applicable

Re: Using Include in Qlik Sense

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

9 Replies
nareshguntur
Not applicable

Re: Using Include in Qlik Sense

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.

jpe
Not applicable

Re: Using Include in Qlik Sense

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.

reddys310
Not applicable

Re: Using Include in Qlik Sense

Hi Guruprem,

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

rwunderlich
Not applicable

Re: Using Include in Qlik Sense

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
Not applicable

Re: Using Include in Qlik Sense

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
Not applicable

Re: Using Include in Qlik Sense

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
Not applicable

Re: Using Include in Qlik Sense

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
Not applicable

Re: Using Include in Qlik Sense

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

elena888
Not applicable

Re: Using Include in Qlik Sense

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