Qlik Community

Qlik Sense Documents

Qlik Sense documentation and resources.

QlikWorld happening right now! You can still join: REGISTER NOW

How to access system data and variables in an extension

Showing results for 
Search instead for 
Did you mean: 

How to access system data and variables in an extension

Sometimes when you are building a Qlik Sense extension you need to get access to system data. This is espescially true if you are trying to build something a bit more generic. Perhaps you need a list of fields, or dimensions, or measures. Or you need to work with variables.

If you are new to Qlik Sense development you might look in the API documentation for methods to get the data you need. Don’t do that!! Qlik Sense extension model is based on the idea that you use one Generic Object, described in the extensions initialProperties, and modified by the user in the property panel, and possibly programmatically (but that’s really advanced). So while using the API methods to get additonal data is the approach to use in mashups or Web apps that access Qlik data, you should avoid using them in a masup.

Instead you should add the data you need to the underlying Generic Object, by adding them to your initialProperties structure. Here is a little table of what you can use:

You needDo not use API callInstead add to initialProperties
List of fieldsapp.getList("FieldList")qFieldListDef
List of measuresapp.getList("MeasureList")qMeasureListDef
List of dimensionsapp.getList("DimensionList")qDimensionListDef
List of variablesapp.getList("VariableList")qVariableListDef
Variable valueapp.variable.getContent(..)qStringExpression or

I have made an example extension that does this for you. The initialProperties in it looks like this:


This is a shorter version of a post on my blog:https://extendingqlik.upper88.com/accessing-system-data-and-variables-in-a-qlik-sense-extension/

Version history
Last update:
‎2018-01-19 01:54 AM
Updated by: