Loading
Salesforce now sends email only from verified domains. Read More
Business Rules Engine
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          How Grouping Works in Decision Tables

          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).

            Example of using grouping fields with the Any condition.

          • 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.

          Example
          Example A decision table with these columns and rows is grouped by a single input field:
          INPUTOUTPUT
          Serial NumberProduct NameStatusProduct 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
          The table is grouped by the Product Name field and the rows are split into these smaller groups.

          This group corresponds to the value P1 for the Product Name field.

          INPUTOUTPUT
          Serial NumberProduct NameStatusProduct 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.

          INPUTOUTPUT
          Serial NumberProduct NameStatusProduct 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.

          INPUTOUTPUT
          Serial NumberProduct NameStatusProduct CODE
          11   Active P303
          12   Inactive P300
          When P1 is passed as the input value to the table, the rows in the table that’s grouped by Product Name field value P1 are looked up.
          Example
          Example A decision table with these columns and rows is grouped by two input fields:
          INPUTOUTPUT
          Serial NumberProductFabricProduct 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
          The table is grouped by the Product and Fabric fields. The rows are split into these smaller groups based on these unique combinations of values in the Product and Fabric fields:
          • Shirt, Cotton
          • Shirt, Linen
          • Dress, Silk
          • Dress, Cotton
          • Jacket, <no value>
          This group corresponds to the values Shirt and Cotton for the Product and Fabric fields.
          INPUTOUTPUT
          Serial NumberProductFabricProduct CODE
          1 Shirt Cotton P101
          5 Shirt Cotton P105
          8 Shirt Cotton P202
          This group corresponds to the values Shirt and Linen for the Product and Fabric fields respectively.
          INPUTOUTPUT
          Serial NumberProductFabricProduct CODE
          4 Shirt Linen P108
          This group corresponds to the values Dress and Silk for the Product and Fabric fields respectively.
          INPUTOUTPUT
          Serial NumberProductFabricProduct CODE
          2 Dress Silk P202
          9 Dress Silk P101
          This group corresponds to the values Dress and Cotton for the Product and Fabric fields respectively.
          INPUTOUTPUT
          Serial NumberProductFabricProduct CODE
          3 Dress Cotton P200
          This group corresponds to the value Jacket and empty cells for the Product and Fabric fields respectively.
          INPUTOUTPUT
          Serial NumberProductFabricProduct CODE
          11 Jacket   P303
          12 Jacket   P300
          When the values Shirt and Cotton are provided as input for the lookup table, only the group where the Product and Fabric field values are Shirt and Cotton is looked up.
           
          Loading
          Salesforce Help | Article