Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

markp201
Contributor 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.

Tags (2)
1 Solution

Accepted Solutions
markp201
Contributor III

Re: Include

Here's what finally worked.

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

5 Replies
ger_alegria
Contributor

Re: Include

Try with the same script but in a .txt

handry_orozco
New Contributor III

Re: Include

Try this


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

Vegar
Valued Contributor

Re: Include

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.

Please ekskuse my Norglish and Swenglish typos.
devarasu07
Honored Contributor II

Re: Include

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
Contributor III

Re: Include

Here's what finally worked.

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

Community Browser