Qlik Community

Ask a Question

New to Qlik Sense

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

Announcements
Qlik Highlights 2020 Giveaway! Watch, reply and have a chance to win a $200 Amazon Gift Card! Watch Video
cancel
Showing results for 
Search instead for 
Did you mean: 
Creator III
Creator III

Include

I saved a script externally but when I try include, the script just skips over the line.

If I use must_include, i do not get an error.

$(Include=lib://folder\path\file.qvs)

also tried

$(Include=lib://folder/path/file.qvs) and

$(Include=lib:\\folder\path\file.qvs)

I have not tried quotes or square brackets.

1 Solution

Accepted Solutions
Creator III
Creator III

Here's what finally worked.

$(Include=[lib://FolderConnection\Subfolder under FolderConnection\Scripts\code.qvs]);

View solution in original post

5 Replies
Partner
Partner

Try with the same script but in a .txt

Partner
Partner

Try this


$(Must_Include=Lib:\\Folder\Path\file.qvs);

Partner
Partner

Are your sure your are executing that line of code. Check if it might be omitted as a part of a If-statement or similar.

Plees ekskuse my Swenglish and or Norweglish spelling misstakes
Master II
Master II

Hi,

1) Specify an absolute file path,

example like  lib:// folder connection. (i.e: Create new Connection - define your root folder of your script or .qvs file)

2) example:

$(Include=[lib://Sample/TraceRowCount.qvs]);

$(Include=[lib://Apps/Apps\Config.qvs]);

$(Include=[lib://Apps/Apps\SetVariables.txt]);

or

$(Must_Include=[lib://Apps/Apps\Config.qvs]);

$(Must_Include=[lib://Apps/Apps\SetVariables.txt]);

There are two versions of the variable:

Include does not generate an error if the file cannot be found, it will fail silently.

Must_Include generates an error if the file cannot be found.

111.jpg

Ref:

https://help.qlik.com/en-US/sense/3.1/Subsystems/Hub/Content/Scripting/SystemVariables/Include.htm

Creator III
Creator III

Here's what finally worked.

$(Include=[lib://FolderConnection\Subfolder under FolderConnection\Scripts\code.qvs]);

View solution in original post