Skip to main content
Version: 8.1


This function is used by Ignition's Expression language.



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.


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.


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')