QlikView System Variables

Copied below topic from QV help. Include, Must_Include and HidePrefix system variables are extensively used. If we could remember other available variables and using it in right Use Case, might help in coding better.

System Variables

These variables have special meanings to QlikView:

Floppy

Returns the drive letter of the first floppy drive found, normally a:. A system-defined variable.

CD

Returns the drive letter of the first CD-ROM drive found. If no CD-ROM is found, then c: is returned. A system-defined variable.

$(Include =filename )

$(Must_Include =filename )

The include and must_include variables specify a file that contains text that should be included in the script. The entire script can thus be put in a file. This is an user-defined variable.

The difference between include and must_include is that include will fail silently if the file is not found during script reload, while must_include will throw an error if the file is not found.

Examples:

$(Include=abc.txt);

$(Must_Include=def.txt);

I.e. the construction set Include =filename is not applicable.

HidePrefix

All field names beginning with this text string will be hidden in the same manner as the system fields. A user-defined variable.

Example:

set HidePrefix=’_’ ;

If this statement is used, the field names beginning with an underscore will not be shown in the field name lists when the system fields are hidden.

HideSuffix

All field names ending with this text string will be hidden in the same manner as the system fields. A user-defined variable.

Example:

set HideSuffix=’%’;

If this statement is used, the field names ending with a percentage sign will not be shown in the field name lists when the system fields are hidden.

QvPath

Returns the browse string to the QlikView executable. A system-defined variable.

QvRoot

Returns the root directory of the QlikView executable. A system-defined variable.

QvWorkPath

Returns the browse string to the current QlikView document. A system-defined variable.

QvWorkRoot

Returns the root directory of the current QlikView document. A system-defined variable.

StripComments

If this variable is set to 0, stripping of /*..*/ and // comments in the script will be inhibited. Certain database drivers using /*..*/ comments for defining hints in select statements may otherwise cause script errors. It is recommended that this variable be reset to 1 immediately after the statement(s) where it is needed. If this variable is not defined, stripping of comments will always be performed.

Example:

set StripComments=0;

Verbatim

Normally all field values are automatically stripped of preceding and succeeding blank characters (ASCII 32) before being loaded into the QlikView database. Setting this variable to 1 suspends the stripping of blank characters.

Example:

set Verbatim = 1;

OpenUrlTimeout

This variable defines the timeout in seconds that QlikView should respect when getting data from URL sources (e.g. HTML pages). If omitted the timeout is about 20 minutes.

Example:

set OpenUrlTimeout=10

WinPath

Returns the browse string to Windows. A system-defined variable.

WinRoot

Returns the root directory of Windows. A system-defined variable.