Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
markp201
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
markp201
Creator III
Creator III
Author

Here's what finally worked.

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

View solution in original post

5 Replies
ger_alegria
Partner - Creator
Partner - Creator

Try with the same script but in a .txt

handry_orozco
Partner - Contributor III
Partner - Contributor III

Try this


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

Vegar
MVP
MVP

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.

devarasu07
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

markp201
Creator III
Creator III
Author

Here's what finally worked.

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