Adding, removing, and editing rows

You can add rows to and remove rows from a decision table, and edit the contents of a row using the decision table editor.

About this task

To edit a row, click in the decision table on the appropriate cell in the row. The editor opens, showing the information for the cell you clicked on, and the toolbar displays the tasks you can carry out:

Completed condition statement showing green check mark.
Note:

You cannot edit rows if the column is locked. You set or release locks through the options panel for each column, or through table properties for global locks.

Click any row number to display the rule in the editor in its usual if-then form.

Procedure

The editor toolbar provides various options for adding, deleting and editing rows in decision tables.

  1. To add a row:
    1. Click the appropriate cell in the row before or after the position in which you want to add the new row.

      Clicking the correct cell is particularly important when you add a row from a grouped cell.

    2. In the editor toolbar, select how to add the row:
      • Icon to insert a row above the selected one - Inserts the row above the cell you select.

      • Icon to insert a row under the selected one - Inserts the row under the cell you select.

      • Icon to insert an Otherwise row - Inserts an Otherwise row under the cell you select.

      • Icon to insert as many rows as there are remaining domain items - Inserts as many rows as there are remaining possible values for that column. This button is available only when the column contains grouped cells.

    3. Complete the cells of the new row.
  2. To delete a row:
    1. Click the appropriate cell in the row you want to delete.

      Clicking the correct cell is particularly important when you delete a row from a grouped (partitioned) cell.

    2. In the editor toolbar, click Icon to delete the selected row.
  3. To move a row up or down:
    1. Click a cell in the row you want to move. The chosen cell must be in a condition column.
    2. In the editor toolbar, click Icon to move the selected row up to move the row up or Icon to move the selected row down to move the row down.

      If you click a grouped cell, the row can be moved only within its partition.

  4. To split a row:
    1. Click a cell in the row you want to split. The chosen cell must be in a condition column that has subcolumns.
    2. In the editor toolbar, click dtable_icon_splitrow.png to split the row.
    3. Complete the empty values.
  5. To merge rows:
    1. Click a cell in the row you want to merge. The chosen cell must be in a condition column, and the row itself must be completed.
    2. In the editor toolbar, click Icon to merge with row above to merge the row with the one above it, or Icon to merge with row under to merge the row with the one under it.

      When you merge rows, the values in the condition part merge, but the merged row retains the values of the row that was above for the action parts of the row.