You are here:
Contains Operator in Decision Tables
Use the Contains operator to retrieve an output if the decision table row value is an exact match or subset of the query value. The Contains operator is case-sensitive and applies only to input fields in the decision table.
Required Editions
| Available in: Lightning Experience |
| Available in: Enterprise, Unlimited, and Developer Editions for clouds that have Business Rules Engine enabled |
Here are some examples of how the Contains operator works for the data types that support the operator.
| Data Type | Description | EXAMPLE |
|---|---|---|
| Text | Retrieves the output value if the input text is an exact match or subset of the query text. The output is sorted by the sort order for the input columns that’s defined in the decision table. | A decision table column is configured like this:
The Applicant Code column has PQRSTV, PRQST, PQRS, NNABCOP, and PQRSTUVW as the row values. PQRSTUVW is passed as the query string for lookup. The table returns the output values for the matching input cells in ascending order starting with blank values, followed by PQRS, PQRST, and PQRSTUVW Here PQRS, PQRST, and PQRSTUVW are considered as matching values because they’re the subset or exact match to the query string PQRSTUVW. |
| Text | Retrieves the output value if the input text is an exact match or subset of the query text. The output is sorted by the sort order for the input columns that’s defined in the decision table. | A decision table column is configured like this:
The Job Title column includes the following row values: Senior Regional General Manager, General Manager, Regional General Manager, and Assistant General Manager. When Regional General Manager is passed as the input for lookup with the Contains operator, the table returns the output values for the cells that contain an exact match or subset of the input string. The values that contain an exact match or subset of "Regional General Manager" are General Manager and Regional General Manager. |
| Picklist | Retrieves the output value if the input value is an exact match or subset of the query value. Output sort order doesn’t apply to columns of the Picklist data type. |
A decision table column is configured like this:
The Status column has Inactive, Active, Draft, and Not Applicable as the row values. The string Inactive is passed as the query value to look up. The table returns the output values Active and Inactive since both the values are an exact match or subset of the query value. |

