Qlik Sense System Functions – Syntax and Example

Interactive Online Courses: Elevate Skills & Succeed Enroll Now!

1. Objective

Earlier, we have discussed Qlik Sense String Functions. Today, we will see Qlik Sense System Functions. We use the system functions in Qlik Sense to fetch information regarding the system, device and Qlik Sense applications that you are using.

Qlik Sense System Functions - Syntax and Example

Qlik Sense System Functions – Syntax and Example

2. Qlik Sense System Functions

Following are the Qlik Sense System Functions with examples. Let’s discuss them in detail –

i. Author() function in Qlik Sense

The author() function returns the information regarding the author of the current Qlik Sense application as a string. The author’s properties of a Qlik Sense app are the details of that Qlik Sense authorized user which has created the concerning app. You can use this function both in the data load script and in the chart expressions.

The syntax for Author Qlik Sense System Functions :

Author()

ii. ClientPlatform() Function

The ClientPlatfom() function returns a string containing the information about the client’s browser.

The syntax for ClientPlatform QliK Sense System Functions:

ClientPlatfom()

A sample response to this function can be, Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.114 Safari/537.36

iii. ComputerName() function

This function will return a string having the name of your computer. This information will be provided by the operating system. You can use this function both in the data load script and in the chart expressions in Qlik Sense.

Recommended Reading – Qlik Sense Gauge Chart

The syntax of ComputerName Qlik Sense System Functions:

ComputerName()

For instance, this function will return the string ‘Windows-PC’ if the name of your computer is Windows-PC.

iv. DocumentName() function

This function when used, will return a string which contains the name of the current Qlik Sense document with the appropriate extension (.qvf). Note that this function does not return the entire path of the Qlik Sense document but just the document name with extension.

The syntax of DocumentName Qlik Sense System Functions:

DocumentName( )

For instance, if the name of a Qlik Sense document is Sales Analysis. Then this function will return the string ‘Sales Analysis.qvf’.

v. DocumentPath() function

This function returns a string having the complete path of a Qlik Sense document. You can use this function both in the data load script and chart expression.

The syntax for DocumentPath Qlik Sense System Functions :

DocumentPath( )

For instance, if the path to a Qlik Sense document named Costumer Sales is C:\Users\HP\Documents\Qlik\Sense\Apps\Consumer Sales.qvf, then this function will return exactly this in a string.

We recommend you to learn Qlik Sense Box Plot

vi. DocumentTitle() function

The documenttitle() function returns a string with just the title of a Qlik Sense document. You can use this function both in the data load script and chart expression.

The syntax for DocumentTitle Qlik Sense System Functions:

DocumentTitle()

For instance, if the title of your Qlik Sense document or app is Costumer Sales, then this function will return the string ‘Costumer Sales’.

vii. EngineVersion() function

This function returns a string having the version of the Qlik Sense engine you are using.

The syntax for EngineVersion QliK Sense System Functions:

EngineVersion()

For instance, if you are using Qlik Sense version 3.2 then this function will return a string saying ‘Qlik Sense 3.2’.

viii. GetCollationLocale() function

This function returns a string having the culture name of the collation locale being used by you. For this function to return the culture name, you need to set the variable CollationLocale to a value, and if not set, you will get the actual user machine locale as a result.

The syntax for GetCollationLoacle Qlik Sense System Functions:

GetCollationLocale()

ix. GetObjectField() function

This function returns a dimension or field of a particular table.

You must read Qlik Sense Conditional Functions

The syntax for GetObjectField Qlik Sense System Functions:

GetObjectField([Index])

Where, Index is the parameter, using which you can specify which dimension or field you want this function to return. The Index is an integer value.  

For instance, you have three dimensions in a table, ProductLine, ProductCategory and StoreLocation. Then by using the expression,

GetObjectField([3]) you will get the answer, ‘StoreLocation’.

x. GetRegistryString() function

This function returns the value of a particular key in the Windows registry. Registry keys are just like folders containing information regarding Windows registory. The values are like files inside the folders containing detailed information regarding the same. Registry values can be string values, binary values etc. Though, this function returns only the string value for a concerning key.

The syntax for GetRegistryString Qlik Sense Functions:

GetRegistryString(path, key)

Where, path is the path of the registry folder and key is the specific key whose value you want to get as a result of this function.

For example,

GetRegistryString(HKEY_CURRENT_USER\ControlPanel\Keyboard\KeyboardSpeed, KeyboardSpeed)

Returns the value of the key ‘KeyboardSpeed’ which is 31.

xi. IsPartialReload() function

This function returns a Boolean value (True or False) upon evaluating whether the current reload is partial or not. If yes or True, then this function returns -1 and if False, then 0 is returned.

The syntax for IsPartialReload Qlik Sense System Functions:

IsPartialReload()

xii. OSUser() function

The OSUser() function returns a string with the name of the user which is currently using the operating system or is currently connected on Qlik Sense. You can use this function both in the data load script and chart expression.

Recommended Reading Qlik Sense Counter Functions

The syntax for OSUser Qlik Sense System functions:

OSUser()

xiii. ProductVersion() function

This function returns a string having the complete detail of the version of Qlik Sense which is currently being used. Although, this function is equivalent to the EngineVersion() function which is preferred over the ProductVersion() function.

The syntax for Productversion Qlik Sense System Functions:

ProductVersion()

xiv. ReloadTime() function

The ReloadTime() function returns the timestamp of the last instant when the data load took place. You can use this function both in the data load script and chart function.

The syntax for RelaodTime Qlik Sense System Functions:

ReloadTime()

xv. StateName() function

This function returns the name of the alternate state which is used for a visualization. Alternate states are used for dynamic texts or dynamic colors i.e. when the visualization changes its state depending upon some factors or selections in the Qlik Sense document.

The syntax for StateName Qlik Sense System Functions:

StateName()

Example,

  • For dynamic text-
='Region - '& if(StateName() = '$', 'Default', StateName())
  • For dynamic colors-
if(StateName() = 'Group 1', rgb(152, 171, 206),
if(StateName() = 'Group 2', rgb(187, 200, 179),
rgb(210, 210, 210)
    )
)

So, this was all in Qlik Sense System Functions. Hope you like our explanation.

3. Conclusion

Hence, these were all the functions used to retrieve information of the operating system, device, and applications of Qlik Sense. Such functions are very convenient to use if and when you want to use system information.

See also – 

Qlik Sense Mathematical Functions

Reference for Qlik Sense

If you are Happy with DataFlair, do not forget to make us happy with your positive feedback on Google

courses

DataFlair Team

The DataFlair Team provides industry-driven content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our expert educators focus on delivering value-packed, easy-to-follow resources for tech enthusiasts and professionals.

Leave a Reply

Your email address will not be published. Required fields are marked *