You're currently browsing the Ignition 8.0 docs. Click here to view the latest docs.


This function is used by Ignition's Expression language.

Description

This function is only available for Security Level Rules and User Attribute Mapping.

This function checks to see if any of the listed elements are present in the collection object. The function requires at least two arguments, a collection and an element.

Syntax

containsAny(collection, element0[, elementN])

  • Parameters

object collection - A collection of values. Typically from the {security-zone} object or the {idp-attribute:X} object.

string element - One or more comma separated elements to look for.

  • Results

Boolean - True if the collection object contained any of the listed elements. False if otherwise.

Examples
Code Snippet
// returns true for a login attempt against an Ignition IdP, if the user has either the Administrator or Operator roles
containsAny({attribute-source:idTokenClaims:roles}, 'Administrator', 'Operator')
Code Snippet
// returns true for a login attempt if the login location is in at least one of the specified security zones
containsAny({security-zones}, 'site 1', 'mill', 'offshore')
  • No labels