listContainsAll
A Workflow Engine function that returns true when the array field you query contains all of your specified values. Define values as an array, for example [ a ] or [ a, b, c ]. You must specify an array field, not a string.
This function is available for event, alert, and Situation workflows.
The workflow sweep up filter applies to this function.
Back to Workflow Engine Functions Reference.
Arguments
Workflow Engine function listContainsAll
takes the following arguments:
Name | Required | Type | Description |
---|---|---|---|
field | Yes | String | Name of the array field to check values in. You can specify custom info fields. The specified field must be an array of values not a string. |
values | Yes | Object | List of values to check for, any intersection is valid. Define values as an array, for example [ a ] or [ a, b, c ]. |
Example
The following example demonstrates typical use of Workflow Engine function listContainsAll
. If you want to check for the existence of both "Webapp" and "Webserver" elements in an array of services in custom_info
, set the following:
field: custominfo.eventDetails.service_list
values: ["Webapp","Webserver"]
The UI translates your settings to the following JSON:
{"field":"custominfo.eventDetails.service_list","values":["Webapp","Webserver"]}
An object with the following custom_info
value returns true
:
"custom_info": {"eventDetails": {"service_list": [ "Webserver", "Webapp"] } }
An object with the following custom_info
value returns false
:
"custom_info": {"eventDetails": {"service_list": ["Webserver","Network"]} }