Skip to main content Skip to complementary content

File system access restriction

For security reasons, Qlik Sense in standard mode does not support absolute or relative paths in the data load script or functions and variables that expose the file system.

However, since absolute and relative paths were supported in QlikView, it is possible to disable standard mode and use legacy mode in order to reuse QlikView load scripts.

Warning noteDisabling standard mode can create a security risk by exposing the file system.

See: Disabling standard mode

Security aspects when connecting to file based ODBC and OLE DB data connections

ODBC and OLE DB data connections using file-based drivers will expose the path to the connected data file in the connection string. The path can be exposed when the connection is edited, in the data selection dialog, or in certain SQL queries. This is the case both in standard mode and legacy mode.

Tip noteIf exposing the path to the data file is a concern, it is recommended to connect to the data file using a folder data connection if it is possible.

Limitations in standard mode

Several statements, variables and functions cannot be used or have limitations in standard mode. Using unsupported statements in the data load script produces an error when the load script runs. Error messages can be found in the script log file. Using unsupported variables and functions does not produce error messages or log file entries. Instead, the function returns NULL.

There is no indication that a variable, statement or function is unsupported when you are editing the data load script.

System variables

Variable Standard mode / Qlik Sense Cloud Legacy mode Definition
Floppy

Not supported

Supported Returns the drive letter of the first floppy drive found, normally a:.
CD

Not supported

Supported Returns the drive letter of the first CD-ROM drive found. If no CD-ROM is found, then c: is returned.
QvPath

Not supported

Supported Returns the browse string to the Qlik Sense executable.
QvRoot

Not supported

Supported Returns the root directory of the Qlik Sense executable.
QvWorkPath

Not supported

Supported Returns the browse string to the current Qlik Sense app.
QvWorkRoot

Not supported

Supported Returns the root directory of the current Qlik Sense app.
WinPath

Not supported

Supported Returns the browse string to Windows.
WinRoot

Not supported

Supported Returns the root directory of Windows.
$(include=...) Supported input: Library connection Supported input: Library connection or absolute/relative path The Include/Must_Include variable specifies a file that contains text that should be included in the script and evaluated as script code. You can store parts of your script code in a separate text file and reuse it in several apps. This is a user-defined variable.

See: System variables

Regular script statements

Statement Standard mode / Qlik Sense Cloud Legacy mode Definition
Binary

See: Binary

Supported input: Library connection Supported input: Library connection or absolute/relative path The binary statement is used for loading data from another app.
Connect

See: Connect

Supported input: Library connection Supported input: Library connection or absolute/relative path The CONNECT statement is used to define Qlik Sense access to a general database through the OLE DB/ODBC interface. For ODBC, the data source first needs to be specified using the ODBC administrator.
Directory

See: Directory

Supported input: Library connection Supported input: Library connection or absolute/relative path The Directory statement defines which directory to look in for data files in subsequent LOAD statements, until a new Directory statement is made.
Execute

See: Execute

Not supported Supported input: Library connection or absolute/relative path The Execute statement is used to run other programs while Qlik Sense is loading data. For example, to make conversions that are necessary.
LOAD from ...

See: Load

Supported input: Library connection Supported input: Library connection or absolute/relative path Returns the browse string to the Qlik Sense executable.
Store into ...

See: Store

Supported input: Library connection Supported input: Library connection or absolute/relative path Returns the root directory of the Qlik Sense executable.

Script control statements

Statement Standard mode / Qlik Sense Cloud Legacy mode Definition

For each...

filelist mask/dirlist mask

See: For each..next

Supported input: Library connection

Returned output: Library connection

Supported input: Library connection or absolute/relative path

Returned output: Library connection or absolute path, depending on input

The filelist mask syntax produces a comma separated list of all files in the current directory matching the filelist mask. The dirlist mask syntax produces a comma separated list of all directories in the current directory matching the directory name mask.

File functions

Function Standard mode / Qlik Sense Cloud Legacy mode Definition
Attribute()

See: Attribute - script function

Supported input: Library connection Supported input: Library connection or absolute/relative path Returns the value of the meta tags of different media files as text.
ConnectString()

See: ConnectString - script function

Returned output: Library connection name Library connection name or actual connection, depending on input Returns the active connect string for ODBC or OLE DB connections.
FileDir()

See: FileDir - script function

Returned output: Library connection

Returned output: Library connection or absolute path, depending on input The FileDir function returns a string containing the path to the directory of the table file currently being read.
FilePath()

See: FilePath - script function

Returned output: Library connection

Returned output: Library connection or absolute path, depending on input The FilePath function returns a string containing the full path to the table file currently being read.
FileSize()

See: FileSize - script function

Supported input: Library connection

Supported input: Library connection or absolute/relative path The FileSize function returns an integer containing the size in bytes of the file filename or, if no filename is specified, of the table file currently being read.
FileTime()

See: FileTime - script function

Supported input: Library connection

Supported input: Library connection or absolute/relative path The FileTime function returns a timestamp for the date and time of the last modification of the file filename. If no filename is specified, the function will refer to the currently read table file.
GetFolderPath()

See: GetFolderPath - script function

Not supported

Returned output: Absolute path

The GetFolderPath function returns the value of the Microsoft Windows SHGetFolderPath function. This function takes as input the name of a Microsoft Windows folder and returns the full path of the folder.
QvdCreateTime()

See: QvdCreateTime - script function

Supported input: Library connection Supported input: Library connection or absolute/relative path This script function returns the XML-header time stamp from a QVD file, if any is present, otherwise it returns NULL.
QvdFieldName()

See: QvdFieldName - script function

Supported input: Library connection Supported input: Library connection or absolute/relative path This script function returns the name of field number fieldno, if it exists in a QVD file (otherwise NULL).
QvdNoOfFields()

See: QvdNoOfFields - script function

Supported input: Library connection Supported input: Library connection or absolute/relative path This script function returns the number of fields in a QVD file.
QvdNoOfRecords()

See: QvdNoOfRecords - script function

Supported input: Library connection Supported input: Library connection or absolute/relative path This script function returns the number of records currently in a QVD file.
QvdTableName()

See: QvdTableName - script function

Supported input: Library connection Supported input: Library connection or absolute/relative path This script function returns the name of the table stored in a QVD file.

System functions

Function Standard mode / Qlik Sense Cloud Legacy mode Definition
DocumentPath()

Not supported

Returned output: Absolute path

This function returns a string containing the full path to the current Qlik Sense app.
GetRegistryString()

 

Not supported

Supported Returns the value of a named registry key with a given registry path. This function can be used in chart and script alike.

See: System functions

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!