You are here:
How Grouping Works in Decision Tables
When you create a decision table, you can group the table’s rows by input fields. Grouping splits each unique combination of values in the grouping field rows into their individual group. By categorizing the data logically, when you provide input values from the grouping fields for lookup, the lookup considers only the group associated with that value. Grouping helps streamline the lookup process by focusing only on the relevant information for the given input values.
Required Editions
| Available in: Lightning Experience |
| Available in: Enterprise, Unlimited, and Developer Editions for clouds that have Business Rules Engine enabled |
Here are some considerations for grouping decision table rows.
- You can group a table’s rows by up to two input fields that use the Equals operator.
- You can group a decision table’s rows when the input condition uses the All, Any, or Custom
logic.
If you use the Any or Custom logic, grouping fields aren’t part of the input condition logic. However, the grouping fields are appended to the logic by default.
For example, a decision table has four input fields (3). The table’s rows are grouped by the Name and Id fields (2). The table is configured with the Any condition logic, which uses the OR operator. Here, the grouping fields are excluded from the condition logic (1).

- When you group a table’s rows by two input fields, you must pass lookup values for both the fields.
- You can group a decision table’s rows when the number of input fields used for grouping is
less than the total number of input fields in the table.
For example, if your table has three input fields, you can use up to two fields for grouping. If your table has two input fields, you can use one of the fields for grouping. If your table has only one input field, you can’t group the table’s rows.
- If the field that you used for grouping has empty cells, the rows with the empty cells are
consolidated into a separate group. When you provide an input value, the group that corresponds
to the input value is looked up. When you don’t provide an input value for the grouping field,
only the group with the rows where the grouping field cells are empty is looked up.
This lookup behavior is different from the lookup behavior for tables without row grouping, where rows with both the input value and any empty cells in the grouping field are looked up.
| INPUT | OUTPUT | ||
|---|---|---|---|
| Serial Number | Product Name | Status | Product CODE |
| 1 | P1 | Active | P101 |
| 2 | P2 | Inactive | P202 |
| 3 | P2 | Active | P200 |
| 4 | P1 | Inactive | P108 |
| 5 | P1 | Active | P105 |
| 8 | P1 | Active | P202 |
| 9 | P2 | Inactive | P101 |
| 11 | Active | P303 | |
| 12 | Inactive | P300 | |
This group corresponds to the value P1 for the Product Name field.
| INPUT | OUTPUT | ||
|---|---|---|---|
| Serial Number | Product Name | Status | Product CODE |
| 1 | P1 | Active | P101 |
| 4 | P1 | Inactive | P108 |
| 5 | P1 | Active | P101 |
| 8 | P1 | Active | P101 |
This group corresponds to the value P2 for the Product Name field.
| INPUT | OUTPUT | ||
|---|---|---|---|
| Serial Number | Product Name | Status | Product CODE |
| 2 | P2 | Active | P202 |
| 3 | P2 | Inactive | P200 |
| 9 | P2 | Inactive | P101 |
This group is specific to the cells in the Product Name field being empty.
| INPUT | OUTPUT | ||
|---|---|---|---|
| Serial Number | Product Name | Status | Product CODE |
| 11 | Active | P303 | |
| 12 | Inactive | P300 | |
| INPUT | OUTPUT | ||
|---|---|---|---|
| Serial Number | Product | Fabric | Product CODE |
| 1 | Shirt | Cotton | P101 |
| 2 | Dress | Silk | P202 |
| 3 | Dress | Cotton | P200 |
| 4 | Shirt | Linen | P108 |
| 5 | Shirt | Cotton | P105 |
| 8 | Shirt | Cotton | P202 |
| 9 | Dress | Silk | P101 |
| 11 | Jacket | P303 | |
| 12 | Jacket | P300 | |
- Shirt, Cotton
- Shirt, Linen
- Dress, Silk
- Dress, Cotton
- Jacket, <no value>
| INPUT | OUTPUT | ||
|---|---|---|---|
| Serial Number | Product | Fabric | Product CODE |
| 1 | Shirt | Cotton | P101 |
| 5 | Shirt | Cotton | P105 |
| 8 | Shirt | Cotton | P202 |
| INPUT | OUTPUT | ||
|---|---|---|---|
| Serial Number | Product | Fabric | Product CODE |
| 4 | Shirt | Linen | P108 |
| INPUT | OUTPUT | ||
|---|---|---|---|
| Serial Number | Product | Fabric | Product CODE |
| 2 | Dress | Silk | P202 |
| 9 | Dress | Silk | P101 |
| INPUT | OUTPUT | ||
|---|---|---|---|
| Serial Number | Product | Fabric | Product CODE |
| 3 | Dress | Cotton | P200 |
| INPUT | OUTPUT | ||
|---|---|---|---|
| Serial Number | Product | Fabric | Product CODE |
| 11 | Jacket | P303 | |
| 12 | Jacket | P300 | |

