The ElementOf() function determines whether or not a namespace value matches a set of values based on a match instruction. The value may match any of the items in the provided set. Note that it is a case sensitive and exact match.
Boolean ElementOf(Variable, "matchValue")
where:
o Variable -- the namespace and attribute (for example, Device.country) to be matched.
o matchValue -- the value you want to match in the path expression(s). The set may be specified as an actual array (for example, ["US", "CA", "UK"]), or as a string that can be parsed into a set. When using the string format, the string must begin and end with either brackets [] or parenthesis (). Elements within the set are separated by commas. Elements containing commas may be wrapped with quotes. For example, "[CA, \"UK, US\"]" contains two elements: "CA" and "UK, US".
The following example uses the device namespace to evaluate all assets with a country attribute of JP or CN, using a string that is parsed into a set of two strings:
If: ElementOf(Device.country, "[JP, CN]")
The following example uses the device namespace to evaluate all assets with a country attribute of US, CA, or UK, using an array of three strings:
If: ElementOf(Device.country, ["US", "CA", "UK"])