/
VALUE_CONTAINS ()
VALUE_CONTAINS ()
VALUE_CONTAINS (search_into, search_value[, true_value] [, false_value])
Verifies whether the value specified in search_value is one of the values contained in search_into
Input Parameters
search_into | array | Can be question reference, OBJECT CODE, array or FORMULA |
search_value | string | Can be question reference, OBJECT CODE, string or FORMULA. Must be a single value (not an array) |
true_value | any | Optional. Is the value returned by the FORMULA when the value search_value is one of the values contained in search_into If not provided, the default value is 1 |
false_value | any | Optional. Is the value returned by the FORMULA when the value search_value is NOT one of the values contained in search_into If not provided, the default value is 0 |
Execution
Always
Examples
FORMULA | Return value |
---|---|
VALUE_CONTAINS(FORM.DATA.ORGAN, "HEART") | Returns 1 if "HEART" is found in the string or array returned by the evaluation of the OBJECT CODE FORM.DATA.ORGAN |
VALUE_CONTAINS(["LIVER", "LUNG", "HEART"], "HEART", "existent", "inexistent") | Returns "existent" |
VALUE_CONTAINS($23, "HEART", "existent", "inexistent") | Returns "existent" if "HEART" is found in the question referenced by $23 (in the same FORM where the FORMULA is executed) |
, multiple selections available,
Related content
JSON_VALUE()
JSON_VALUE()
Read with this
CODE_LIST()
CODE_LIST()
More like this
EVENT_INSERT()
EVENT_INSERT()
Read with this
TASK_INSERT()
TASK_INSERT()
Read with this
COUNT ()
COUNT ()
Read with this
OBJECT CODES
OBJECT CODES
Read with this