IsIn()
Checks whether the specified value is present in a list of values. This function takes any number of arguments of any type and returns a Boolean value. If the value is found in the list of values, the function returns the Boolean value TRUE
. If the value is not found, the function returns the Boolean value FALSE
.
Syntax
IsIn(<value_to_check>, <first_value> ... <last_value>)
Input
value_to_check
Boolean, date, integer, number, string
The value to find in the list of values.
first_value
Boolean, date, integer, number, string
The first value in the list to compare to the value to check.
last_value
Boolean, date, integer, number, string
(Optional) The last value in the list to compare to the value to check.
Output
Boolean
Examples
Assume that you have a form in which there is a question with the reference name marital_status, and that this question was answered "Married".
- The expression
IsIn($marital_status, "Common Law", "Married")
returnsTRUE
. - The expression
IsIn($marital_status, "Divorced", "Single")
returnsFALSE
.