Skip to main content

Conditions (Advanced view)

Define the resource and/or user conditions that the rule should apply to.


resource.resourcetype = <resourcetypevalue> [OPERATOR resource.<property> = <propertyvalue> [OPERATOR resource.<property> = <propertyvalue> ...]]

A simple condition would only consist of the first part: resource.resourcetype = <resourcetypevalue>. The succeeding operators, properties, and property values in the example above are optional.

If you select a resource and a resource condition from the drop-down list in the Basic view, the Conditions field in the Advanced view is automatically filled in with corresponding code for the selected resource type.

Conditions are defined using property-value pairs. You are not required to specify resource or user conditions. In fact, you can leave the Conditions field empty.

The order that you define conditions does not matter. This means that you can define the resources first and then the user and/or resource conditions or the other way round. However, it is recommended that you are consistent in the order in which you define resources and conditions as this simplifies troubleshooting.

When using multiple conditions, you can group two conditions by clicking Group. After the conditions have been grouped, you have the option Ungroup. Additional subgrouping options are Split and Join. The default operator between conditions is OR. You can change this in the operator drop-down list. Multiple conditions are grouped so that AND is superior to OR.

To enable synchronization between the Basic and Advanced sections (so called backtracking), extra parentheses are added to conditions created using the Basic section. Similarly, a user definition with an empty condition is automatically included in the Conditions text field if you add a resource using the Basic section. However, if you create your rule using the Advanced section only, and do not need backtracking, you do not need to follow these conventions.


Argument Description
resource Implies that the conditions will be applied to a resource.

Implies that the conditions will be applied to a resource of the type defined by the resourcetypevalue.

You can also use predefined functions for conditions to return property values.

resourcetypevalue Value used in the condition to find matches or non-matches, depending on what operator that is used (=, !=, or like). You must provide at least one resource type value.

The property name for the resource condition. See Properties for available names.

propertyvalue The value of the selected property name.
user Implies that the conditions will be applied to a user.


The following property groups are available.


Property Description Example
resource.@<customproperty> Custom property associated with the resource. In the examples, @Department is the custom property name. resource.@Department = Finance.

resource.@Department = user.userDirectory Name of the resource. like "*US*". A string containing "US" will match the condition. ID of the resource. The resource in this case is an app.

Resource user and owner of an object

Property Description Example

Email of the user.

Email of the owner.""""

user.environment.browser Session based attribute for browser. Use the "like" operator instead of the "=" operator, because the browser data is sent in a format that includes version and other details, for example: "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0". You can use the "=" operator instead, but then you need to specify the whole value. user.environment.browser like "*Firefox*"
user.environment.context Session based attribute for context. (The QMC has a separate setting for context.) user.environment.context="Management Access"
user.environment.device Session based attribute for device. user.environment.device="iPhone"

Session based attribute for IP address.

Security rules example: Access to stream by IP address

user.environment.os Session based attribute for operating system. user.environment.os like "Windows*"
user.environment.secureRequest Session based attribute for secureRequest. Value true - if SSL is used - otherwise false. user.environment.secureRequest="true"
user.environment.[SAML attribute]

Session based attribute that is supplied at the time of authentication, such as"<attribute name>"
user.environment.[ticket attribute]

Session based attribute that is supplied at the time of authentication, such as"<attribute name>"
user.environment.[session attribute]

Session based attribute that is supplied at the time of authentication, such as"<attribute name>"

Group that the user belongs to.

Group that the owner belongs to.



User directory that the user belongs to.

User directory that the owner belongs to.





ID of the user.

ID of the owner.





Roles of the user.

Roles of the owner.




To use the user.environment conditions, you must enable Extended security environment in the virtual proxy.

See: Virtual proxies

Resource app

Property Description Example Name of the stream that the app is published to."Finance"

Resource app.object

Property Description Example Name of the stream that the app object is published to."Test" Name of the app that the object is part of."Q3_Report"

approved Indicator of whether the object was part of the original app when the app was published. Values: true or false.


description Object description.



Possible values:

  • app_appscript
  • dimension
  • embeddedsnapshot
  • genericvariableentry

  • hiddenbookmark
  • masterobject
  • measure
  • odagapplink
  • sheet
  • snapshot
  • story
  • bookmark


published Indicator of whether the object is published. Values: true or false.


Resource related to apps such as app.content and reloadtask

Property Description Example Name of the stream that the app is published to."Test" Name of the app."Q3_Report"

Resource DataConnection

Property Description Example

Type of data connection.

Possible values:

  • ODBC
  • Folder
  • Internet
  • Custom (for all custom connectors)


Resource SystemRule

Property Description Example

System rule category.

Possible values:

  • Security
  • License
  • Sync


ResourceFilter Resource filter of the rule. resource.resourcefilter matches "DataConnection_\w{8}-\w{4}-\w{4}-\w{4}-\w{12}"

Context for the rule.

Possible values:

  • BothQlikSenseAndQMC
  • QlikSenseOnly
  • QMCOnly



Type of rule.

Possible values:

  • Default
  • Read only
  • Custom


Resource ContentLibrary

Property Description Example

Possible values:

  • media


Resource ServerNodeConfiguration

Property Description Example

Central node indicator, values: true or false.


nodePurpose Node purpose: development or production.


Resource UserDirectory

Property Description Example

Name of the user directory.


Resource UserSyncTask

Property Description Example

Name of the user directory connector."Employees"


Name of the user directory.


Resource Widget

Property Description Example

Name of the library that the widget belongs to."Dev"

Note: Environment data received from external calls, for example, type of OS or browser, is not secured by the Qlik Sense system.