System functions
System functions provide functions for accessing system, device and QlikView document properties.
Use the drop-down on each function to see a brief description and the syntax of each function. For some of the functions, you can get further details about that specific function by clicking the function name in the syntax description.
This function returns a string containing the author property of the current document. It can be used in both the load script and in a chart expression.
Author( )
This function returns the user agent string of the client browser. It can be used in both the load script and in a chart expression.
Example:
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.114 Safari/537.36
ClientPlatform( )
This function returns a string containing the name of the computer as returned by the operating system. It can be used in both the load script and in a chart expression.
ComputerName( )
This script function returns the culture name of the collation locale that is used. If the variable CollationLocale has not been set, the actual user machine locale is returned.
GetCollationLocale( )
This function returns the value of a named extended property in the sheet object with the given object ID. If objectid is not given, the sheet object containing the expression will be used. An extended property is defined for the extension object in its definition file.
GetExtendedProperty(name[, objectid])
GetObjectField() returns the name of the dimension. Index is an optional integer denoting the dimension that should be returned.
GetObjectField([index])
This function returns the value of a key in the Windows registry. It can be used in both the load script and in a chart expression.
GetRegistryString(path, key)
This function can be used in the script only and opens an input box that prompts the user for a value during the script execution. The parameters cue and caption are used as message and caption texts, respectively. The function returns the entered value.
The input box function returns NULL if the dialog is canceled, closed or cannot be shown.
Example:
Load
Input('Enter value', 'Input box') as v,
Recno () as r
autogenerate 3;
Input(str cue [, str caption])
This function can be used in the script only and opens a message box during the script execution. The parameters msg and caption are used as message and caption texts, respectively. The parameter mb_buttons defines what buttons will be shown in the message box, according to:
0 or 'OK' for a single
OK button,
1 or 'OKCANCEL' for two buttons, OK and Cancel,
2 or 'ABORTRETRYIGNORE' for three buttons, Abort, Retry and Ignore,
3 or 'YESNOCANCEL' for three buttons, Yes, No and Cancel,
4 or 'YESNO' for two buttons, Yes and No,
5 or 'RETRYCANCEL' for two buttons, Retry and Cancel.
The parameter mb_icons defines what icon will be shown in the message box, according to:
0 or empty string for no
icon,
16 or 'ICONHAND' for an icon with an X, used for critical errors,
32 or 'ICONQUESTION' for an icon with a question mark,
48 or 'ICONEXCLAMATION' for icon with an exclamation mark, used for minor
errors, cautions and warnings
64 or 'ICONASTERISK' icon with an i, used for
informational messages.
The parameter mb_defbutton defines what button will have focus when the message box is shown, according to:
0 or 'DEFBUTTON1' if the
first button should have focus,
256 or 'DEFBUTTON2' if the second button should have focus,
512 or 'DEFBUTTON3' if the third button should have focus,
768 or 'DEFBUTTON4' if the fourth button should have focus.
The function returns an integer that shows what button has been pressed by the user, according to:
1 for OK,
2 for Cancel,
3 for Abort,
4 for Retry,
5 for Ignore,
6 for Yes,
7 for No
The parameter 3, 4 and 5 will internally be added, so if numeric values other than the above mentioned ones are used, you may get an unexpected combination of icons and buttons.
The message box function returns NULL if the dialog cannot be shown.
Example:
Load
MsgBox('Message 2', 'msgbox', 'OKCANCEL', 'ICONASTERISK') as x, 2 as r
autogenerate 1;
MsgBox(str msg [, str caption [, mb_buttons [, mb_icons[, mb_defbutton]]]] )
This function returns a string containing the name of the current user as returned by the operating system. It can be used in both the load script and in a chart expression.
OSUser( )
This function returns the full QlikView version and build number as a string.
Returns a string containing the name of the current QlikView user as entered in for section access.
QVuser( )
This function returns a timestamp for when the last data load finished. It can be used in both the load script and in a chart expression.
ReloadTime( )
This chart function returns the state name of the object in which it is used. The QlikView developer can use this function to have dynamic text and colors when an object’s state is changed. It is important to note that this function works on objects only. It cannot be used in a chart expression to determine the state that the expression refers to.