MAP_VALUE_CONTAINS_IGNORE_CASE
Description
Returns the corresponding return value for the first compare substring found within the provided string, performing case-insensitive matching. If no substrings match, returns default return value optional. If default return value optional is omitted and no match occurs, the function returns $SKIP_ASSIGNMENT.
Syntax
MAP_VALUE_CONTAINS_IGNORE_CASE(string, ...[compare_substring, return_value], default_return_value_optional) -> String
Parameters
| Parameter | Data Type | Required | Description |
|---|---|---|---|
| string | String | Yes | The string to evaluate (case-insensitive). |
| … compare_substring | String | Yes | The substring to search for within the provided string. |
| … return_value | Object | Yes | The value returned if the compare substring is found. |
| default_return_value_optional | Object | No | The value returned if no substrings match. If omitted and no match occurs, returns $SKIP_ASSIGNMENT. |
Examples
MAP_VALUE_CONTAINS_IGNORE_CASE("New York - office", "new york", "NY", "California", "CA", "Other")
-- Returns "NY" (case-insensitive).MAP_VALUE_CONTAINS_IGNORE_CASE(Description, "platinum", "Partner", "individual", "Person")
-- Returns "Partner" if Description contains "platinum".
-- Returns "Person" if it contains "individual".
-- Returns $SKIP_ASSIGNMENT otherwise.
-- Matching is case-insensitive and stops at the first match.Tips
Ensure that return_value and default_return_value_optional are of the same data type.