--- title: "contains" slug: "calc-function-contains" updated: 2026-05-12T09:57:08Z published: 2026-05-12T09:57:08Z canonical: "docs.lobstersoftware.com/calc-function-contains" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # contains *See also*: [findFirst, findAll (Find values in lists)](/v1/docs/en/calc-function-find), [isUnique](/v1/docs/en/calc-function-is-unique) > [!NOTE] > The $contains function can be used to check whether a value appears at least once in a list. > > > [!TIP] > > Tooltip > > > > Syntax: *$contains(source,valueToCheck)* > > > > | Parameter | Description | > > | --- | --- | > > | *source* | The list or array of values. | > > | *valueToCheck* | The value, which may occur only once in the source. | > > > > If the value is found, true is returned, otherwise false. > > > > Example: $contains($el(12,true),Needle) – Searches the word "Needle" in a list of text field values. ## 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* | Reads the value to compare from a field path specified here, relative to a list entry (optional). | ## 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 behavior. | | $contains({users},admin,username) | | Searches a list of users for one with the username "admin" (field to search: username). |