Skip to main content Skip to complementary content

Sections in the script

Access control is managed through one or several security tables loaded in the same way as Qlik Sense normally loads data. This makes it possible to store these tables in a normal database. The script statements managing the security tables are given within the access section, which in the script is initiated by the statement Section Access.

If an access section is defined in the script, the part of the script loading the app data must be put in a different section, initiated by the statement Section Application.

Example:  

Section Access;
LOAD * inline
[ACCESS,USERID
USER,U ];
Section Application;
LOAD... ... from... ...

Section access system fields

The access levels are assigned to users in one or several tables loaded within the section access. These tables can contain several different user-specific system fields, typically USERID, and the field defining the access level, ACCESS. All section access system fields will be used for authentication or authorization. The full set of section access system fields is described below.

None, all, or any combination of the security fields may be loaded in the access section. Therefore, it is not necessary to use USERID – an authorization can be made using other fields, for example, serial number only.

ACCESS

Defines what access the corresponding user should have.

Access to Qlik Sense apps can be authorized for specified users or groups of users. In the security table, users can be assigned to the access levels ADMIN or USER. If no valid access level is assigned, the user cannot open the app.

A person with ADMIN privileges has access to all data in the app. A person with USER privileges can only access data as defined in the security table.

USERID Contains a string corresponding to a Qlik Sense user name. Qlik Sense will get the log-on information from the Proxy and compare it to the value in this field.
GROUP Contains a string corresponding to a group in Qlik Sense. Qlik Sense will resolve the user supplied by the proxy against this group.
OMIT

Contains the name of the field that is to be omitted for this specific user. Wildcards may be used and the field may be empty. An easy way of doing this is to use a subfield.

Information noteYou should not apply OMIT on key fields, as this will change the underlying data structure. This may create logical islands and calculation inconsistencies.

Qlik Sense will compare the user supplied by the proxy with UserID and resolve the user against groups in the table. If the user belongs to a group that is allowed access, or the user matches, they will get access to the app.

Information note

If you have locked yourself out of an app by setting section access, you can open the app without data, and edit the access section in the data load script. This requires that you have access to edit and reload the data load script.

See: Opening an app without data

As the same internal logic that is the hallmark of Qlik Sense is also used in the access section, the security fields can be put in different tables. All the fields listed in LOAD or SELECT statements in the section access must be written in UPPER CASE. Convert any field name containing lower case letters in the database to upper case using the Upper function before reading the field by the LOAD or SELECT statement.

See: Upper - script and chart function

A wildcard, *, is interpreted as all (listed) values of this field, that is. a value listed elsewhere in this table. If used in one of the system fields (USERID, GROUP) in a table loaded in the access section of the script, it is interpreted as all (also not listed) possible values of this field.

Information noteWhen loading data from a QVD file, the use of the upper function will slow down the loading speed.
Information noteIf you have enabled section access, you cannot use the section access system field names listed here as field names in your data model.

Example:

In this example, only users in the finance group can open the document.

ACCESS

GROUP

USER

Finance

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!