contains
See also: findFirst, findAll (Find values in lists), isUnique
The $contains function can be used to check whether a value appears at least once in a list.
Syntax
$contains(source,valueToCheck)
Parameter
Name |
Description |
source |
The list or array of values |
valueToCheck |
The value, which may occur only once in the source |
propertyPath |
(Optional) Reads the value to compare from a field path specified here, relative to a list entry. |
Return value
Returns $true if the value occurs at least once in the list.
Example
Syntax |
Input value |
Result |
$contains($input,a) |
["a", "b", "c", "b"] |
$true |
$contains($input,b) |
["a", "b", "c", "b"] |
$true |
$contains($input,d) |
["a", "b", "c", "b"] |
$false |
$contains($el(12,true),{value}) |
|
$el(12,true) returns all values of all repetitions of the element with ID 12. {value} returns a value that will be passed in case of a triggered behaviour. |
$contains({users},admin,username) |
|
Searches a list of users for one with the username 'admin' (field to search: username). |