_find
The Find formula finds a sub-sequence of the input sequence that matches the pattern and returns true if, and only if, a sub-sequence of the input string matches the specified pattern. This formula returns true if the text "flour" is found in the text field $ingredients. Returns "Contains Gluten" if "flour" or "Flour" is found in the $ingredients field, else it returns "Gluten Free". Multi-line mode is enabled. Case-insensitive matching and multi-line mode are enabled by the optional flags "i" and "m" respectively, or "im" to enable both. The find function accepts only strings as arguments. You can force the system to evaluate some non-string data types as strings by adding an empty string with +"". For instance, a link to single fields from other table with multiple values enabled (MVE) is not stored as a string. If the "find" function is used to look for some value such as "anonymous" in a multi-value linked field (MLF) called External CCs, the formula might look like the following: By adding an empty string to the MLF value - using +"" - the MLF value is converted into a string for search purposes. Returns true if the multi-value linked field Syntax
find(pattern, text[,flags])
Examples
find("flour", $ingredients)
find("flour", $ingredients,"im")? "Contains Gluten": "Gluten Free"
Flags
For example, the expression find("flour", $ingredients, "im")
will return "true" if the sequence "flour" or "Flour" is found, and "false" if it is not.Notes
find("anonymous", $external_cc+"")
Example
find("apples",""+$selected_fruit,"i")
$selected_fruit
contains "apples" or "Apples" or "aPPles".