Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
swarup_malli
Specialist
Specialist

Can we import script file into Qliksense?

Is anyone aware of the feature that allows them to import script file into Qliksense  like  its done in Qlikview.

Currently I have to copy the script and paste it in the script editor of Qliksense

6 Replies
undergrinder
Specialist II
Specialist II

Hi Swarup_Malli,

You can use the include statement.

from Script Syntax and Chart Functions Guide:

Include The include variable specifies a file that contains text that should be included in the script. The entire script can thus be put in a file. This is a user-defined variable. This variable supports only folder data connections in standard mode.

Syntax:

$(Include =filename)

Example:

$(Include=abc.txt);

$(Include=lib://MyDataFiles\abc.txt);

If you don't specify a path, the filename will be relative to the Qlik Sense app working directory. You can also specify an absolute file path, or a path to a lib:// folder connection

The construction set Include =filename is not applicable.

HTH

G.

swarup_malli
Specialist
Specialist
Author

Thank you ! for the response

I'm aware of that,I use Include statement very often (But even Include statement has to be manually typed in Qliksense  unlike in Qlikview)

I meant somthing like this:

Import.PNG

undergrinder
Specialist II
Specialist II

This function is not implemented in QlikSense.

gferran
Partner - Contributor III
Partner - Contributor III

Hi,

you can use the must_include sentence if you must be sure the file is loaded. This sentence will give you an error when reloading if the file script doesn't exist.

Regards

undergrinder
Specialist II
Specialist II

I didn't know, that "must_include" statement is possible to use in Qlik Sense. I'll try it.

G.

Not applicable

Hi Swarup_Malli

If you think about a general Menu function to import scripts, then I haven't seen it in Qlik Sense either.

If you think about generally including scripts, then your syntax may look as follows - the " Lib.//000_Include " is a Qlik Sense Data Connector linked to the folder ...\000_Include where the scripts are stored as *.qvs files.

.. and yes, must-include works with Qlik Sense as well.. 🙂

Regards

// *********************  Main data Formats *****************************************************************************************

// Laden der zentral verwalteten Datenformate

// Load central repository of data formatting

      $(Must_Include=lib://000_Include/general_formats_qv.qvs);

     

// Laden der zentral verwalteten Dateneingaben fuer Prompts in den SQL-Statements

// Load central repository of data-filters in prompts for sql statements

      $(Must_Include=lib://000_Include/dates_prompts_qv.qvs);

// Laden der zentral verwalteten Definitionen für Corporate identity

// Load central definitions of Corporate Identity such as color theme, etc.

      $(Must_Include=lib://000_Include/CI_Colors_qv.qvs);