Row ordering

In the Business console, you can select either automatic or manual row ordering to organize the rows in decision tables.

Automatic row ordering groups rows that have the same condition values. You can sort any column, and you are not constrained by the partition structure. You can edit your decision table as a flat spreadsheet, and let the decision table editor combine conditions for you.

Automatic row ordering is not appropriate for a table that must have its rows in a specific order. For this type of table, you must organize the rows manually.

When you open a decision table for the first time, you are asked to select the type of row ordering. Automatic row ordering is selected by default because it is appropriate for most use cases. Manual row ordering is used in advanced cases where the order of the rows must be controlled.

You can also set the type of row ordering through Details in the decision table editor. You must save and reopen the decision table to implement the property change.

Important: When an administrator selects the row ordering for a decision table, the prompt for selecting the row ordering does not open when the business user edits the decision table. The business user can still change the row ordering through Details in the decision table editor.

Automatic row ordering

Automatic row ordering organizes a decision table by grouping rows that share condition values.

Table before optimization:

Image shows table before optimization.

Table after optimization:

Image shows table after optimization.
You can add, move, and remove rows when a table is set to automatic row ordering. You can apply automatic row ordering in two ways:
Optimize Row Order button
Optimize Row Order "" reorganizes the rows during an editing session. The button is activated by changes to the contents of the table.
Save
The editor automatically reorganizes the rows into groups when you save the table.

Automatic row ordering lists the groups alphabetically or numerically depending on the shared values. You can use the sort buttons to change the order of the rows. When you sort a column that does not contain shared conditions, all the rows in the table are reorganized by the values in the sorted column.

Manual row ordering

Manual row ordering organizes rows into partitioned groups. As the following example shows, a partitioned group has a shared condition value:

Image shows partitioned rows.

Rows 1 and 2 contain a partitioned group that shares Grade A, while rows 3 and 4 show a partitioned group that is divided into separate rows. With manual row ordering, you work with rows in groups. You manually add rows to groups, and set the order of the groups. If you change the value of a cell in a group, you update all the other cells in the group. You cannot copy and paste rows, but you can copy and paste cells.

With manual row ordering, you can group or split rows by selecting cells, right-clicking them, and selecting Group or Split.

You can use the sort buttons to sort condition columns when you use manual row ordering, but you cannot sort action columns. When you sort a column, the grouped rows are sorted within their groups. However, independent rows can be redistributed throughout a table. Sorting does not keep split rows together. You can regroup split rows by sorting the column that contains their shared condition value.

The following images show the sorting patterns of the different row ordering modes.

Before sorting:

Image shows column before sorting.

Sorting with automatic row ordering:

Image shows column after sorting in automatic row ordering mode.

Sorting with manual row ordering:

Image shows column after sorting in manual row ordering mode.