Description
Returns records where at least one value in the expression_list matches a value in the selected database field.
Syntax
IN (expression_list )
Parameter | Description |
---|---|
expression_list | A list of values separated by commas. The list can contain ONLY string values. |
Examples
This function returns records where the CITY field contains one of the following: Manchester, Boston, or Hampton.
CITY IN("Manchester,Boston,Hampton")
Note: The IN Operator ignores or concatenates values.
The IN operator allows you to test if the value of a field in the source datastore matches any value in a list of values, reducing the need for multiple OR conditions when querying, updating, or deleting records. For example, if you want to update records where the City field contains Boston, or Manchester, or Hampton, the formula is as follows:
CITY IN ("Boston,Manchester,Hampton")
or
CITY IN ("Boston", "Manchester", "Hampton")
Issues:
When multiple values are specified, no records are found. In the second example above, the values are concatenated, Boston&Manchester&Hampton, preventing records from matching.
Multiple numerals are not accepted.
Resolution:
You can only use one value, as shown in the following examples:
CITY IN ("Boston")
or
CITY IN (2)
See also