You are here: Reference > Rule types > Decision Tables > Decision Table form - Completing the Table tab

Decision Table form
Completing the Table tab

  1. About 
  2. New 
  3. Table 
  4. Results 
  5. Parameters 
  6. Pages & Classes 
  7. Test Cases 
  1. History 
  2. More... 

Complete the Table tab to record the conditions to be tested in each row. In the rightmost Return column of each row, enter the result of this decision table when all the conditions in the row are true.

If the Redirect this Rule check box on the Results tab is selected, this circumstance-qualified rule is redirected and the Table tab is not used.

When the decision table contains more than 500 cells, the system does not automatically display the matrix on the Table tab when you open the rule form. You can download the table in .xlxs format, make your changes, and import the updated file.

Basics

Follow these steps to complete this tab:

  1. Select and label properties or expressions (in the top of the matrix) first. These become column headings of a matrix, a two-dimensional table.
  2. Next, complete rows with comparisons, actions, and results. The order of rows is significant; at run time rows are evaluated from the top down.
  3. Finally, enter in the Otherwise row a result to be returned if no rows evaluate to true.

Understanding the grid controls and buttons

Use these controls to change the size and structure of the table. Select any cell in the matrix to enable the controls.

Button

Function

Insert a new row before (above) the selected row.

Insert a new row after (below) the selected row.

Delete the selected row or rows. Focus moves to the row above.

Insert a new column before (to the left of) the selected column.

Insert a new column after (to the right of) the selected column.

Delete the selected column or columns. Focus moves to the column at its left.

Insert OR conditions in one cell, to the left of the current test.

Insert Or conditions in one cell, to the right of the current test.

Delete the selected OR condition.

Insert a column in the Actions area to the right of the Results column, to set a property to the results of an expression when this row is the source of the decision table results.

 

If properties are configured and hidden, click to show the properties columns in the Actions area.

Hide the properties columns in the Actions area.

You can drag a row or column grid line to shrink or expand its width or height.

Place the mouse on the top bar and drag to select multiple rows (or on the left bar to select and drag multiple columns) and then click the button (or button) to delete them all. When multiple rows (or columns) are selected, you can drag them up or down (left or right) together.

Other Buttons

You can test the completeness or consistency of the decision table or export the table to .xlxs format.

Button

Function

Show Conflicts

Marks with a Warning icon any rows of the table that are unreachable and any rows that are completely blank. For example, if two rows are identical, the second row will never evaluate to true and so is unreachable.

Note: If the Evaluate All Rows check box (on the Results tab) is selected, all rows are considered reachable.

Click any warning icon on a row to highlight with an orange background the other rows that cause that row to be unreachable. The selected row is highlighted with a pale yellow background (      ).

A decision table that contains no such unreachable rows is called consistent. (The presence of unreachable rows does not prevent you from saving the rule.)

Conflicts are reported as warning messages when you save the form and when you use the Guardrails landing page for the application.

Conflicts do not prevent the rule from validating or executing, but may indicate that the rule does not implement the intended decision.

Show Completeness

Appears on the Table tab when the matrix of values is displayed. Automatically adds suggested rows of the decision table that cover additional cases and reduce or eliminate the situations that fall through to the Otherwise Return expression. They are only suggestions; you can alter or eliminate them.

When a table has more than 500 cells, the matrix is not automatically displayed on the Table tab. To display this button for such a table, display the matrix of values by clicking Load Table in Rule Form.

Import

After you export a decision table, you can make changes in the .xlxs file and import the updated file. The decision table rule form is updated with the changes you made.

You must import the same file that you exported. You can change the name of the exported file and import the renamed file. However, you cannot import a file different from the one you exported.

Export

Exports the decision table in .xlxs format. After you make your changes and save this file, you can import it with your changes.

You can modify OR conditions in rows in the exported file but cannot add them. You can add OR conditions only in the decision table rule form.

Notes:

The Otherwise row is locked in the exported file. You cannot delete this row, and you cannot insert rows when you select this column.

The Return column is locked in the exported file. You cannot delete this column, and you cannot insert columns when you select this column.

 

Completing the heading row

Each column except the Return column corresponds to a property reference or expression. Click a cell in the top row to label a column in the matrix.

Complete the pop-up dialog box to select a property or expression and a label.

Settings

These values are available for headings in the Conditions area.

Field

Description

Property

Enter the condition that you want to evaluate. The condition can be a Single Value property, a property reference to a single value, a linked property reference, or a more complex expression. Use the SmartPrompt to see a list of all the properties available in the Applies To class of this decision table (and in its parent classes).

You also can use the <current-value> keyword to substitute a cell value into the header for the evaluation. For example:

@String.contains(<current-value>,.pyCusLevel)

Click click the Open expression builder icon to start the Expression Builder. (You can enter complex expressions and use the Expression Builder only when the Allowed to Build Expressions? check box is selected on the Results tab.)

Note: You can add or modify a property value by dragging and dropping an instance from the Application Explorer to the Property field. The rule name populates the Label field. Click the dot icon to select the rule.

Label

Enter a text label for the column.

Use Range

Select to require two values defining an open or closed range for the column. Choose the < or <= operator to test the starting value. Choose the > or >= operator to test then ending value. In each cell, enter two values to set the limits of the range.

Use operator

Select an operator for the comparisons in this column. The default is equality (=). If you choose an operator other than =, the operator appears in the column head. An operator in a cell can override the operator you select here, for that cell.

Security

These fields are available for column headings in both the Conditions and Actions areas:

Field

Description

Allow Changing
values in cells

Select a radio button to control who can change the contents of cells in this column. The column background changes to gray for users who cannot update it.

  • Everyone — Anyone who can edit the table can change the contents of cells.
  • No one — No one (including you) can change the contents of cells.
  • Privilege — Any user who holds the selected privilege can change the contents of cells. Select a privilege in the Applies To class of this rule, or in an ancestor class.

This field is not available to users who are delegated this rule.

Click Save. The label you entered appears at the top of the column.

To create another column to the right of a column, click the Insert Column After button (). To create another column to the left of a column, click the Insert Column Before button ().

Optionally, to identify one or more property to be set as it the decision tree row is processed, click the button. Complete the top cell to the right of the Return column with a label and property name.

Completing the body rows

Enter comparison values in each cell in each row.

You can use Windows drag-and-drop operations to reorder one or more columns. Reordering columns does not affect the outcome of the decision table, but may cause evaluation of some rows to end earlier, or later, when a condition in a cell is not met.

You can also use Windows drag-and-drop operations to reorder one or more rows. As rows are evaluated in order from the top until one is found where all cell conditions are true, reordering rows may affect the outcome of the decision table.

Hold the CTRL key down and drag to copy (rather than move) a row or column.

As a best practice, list the more likely outcomes in rows above the rows for outcomes that are less likely.

Conditions

Field

Description

if /
else if /

Define in each row the conditions to be met for each cell. At runtime, the row evaluates to true only if the conditions in each cell evaluate to true.

The label when in this column indicates that at runtime, decision table processing evaluates all rows, rather than stopping at the first row for which all conditions are met. The label appears when you click the Evaluate All Rows option on the Results tab.

(Column)

Enter a match value for the property identified at the top of each column. Alternatively, enter a comparison operator and an expression, such as a literal value, property reference, or linked property reference. The comparison operators are <, >, =, <=, >=, and !=. If you don't enter an operator, the system uses the operator or operators associated with the column head. (The equality operator = does not display in the column head.)

For columns that require a range, enter both a starting value and an ending value. If you enter literal constants for these values, check that the starting value is less than or equal to the ending value.

You can use SmartPrompt to access a Local List of values (if any) defined on the Table Type fields on the General tab of the property. Do not type a period. For example, if the property Size has values such as XS, S, M, L, XL, and XXL defined, click the Down Arrow key to access this list.

To the right of the comparison operator, enter a literal constant, a property reference, or an expression. For guided assistance in entering expressions, click the Expression Builder to start the Expression Builder. (You can enter complex expressions and use the Expression Builder only when the Allowed to Build Expressions? check box is selected on the Results tab.)

To add more rows, click the Insert Row After button () to the left of the row. Another row appears, titled else if.

As a best practice to simplify the form, delete any blank rows. They cause a warning when you save the Decision Table form. Blank rows have no effect on the results of the rule.

Actions

These fields follow the comparison cells in the row and the Arrowseparator.

Field

Description

Return

Enter the result to be returned to the application when all the comparisons in the row are true. Enter a constant, a property reference, an expression, or the keyword Call followed by a space and the name of another decision table.

You can enter values in this column only when the Allowed to Return Values check box is selected on the Results tab.

()

Optional. If you used the Set property values button to create a column to the right of the Return column, enter a constant value, property reference or expression here, or use one of three shorthand forms:

  • Enter a +=1 in the cell to cause the system to add 1 to the current value of the property.
  • Enter += or -= followed by a numeric constant to add or subtract a constant value to from the current value of the property.
  • Enter -= and a text constant to append a constant value to the current value of the property (assumed to have a Type of Text or Identifier).
  • Enter /= for division, *= for multiplication, or %= for the remainder function.

For guided assistance in entering expressions, click the Expression Builder icon to start the Expression Builder. (You can enter complex expressions and use the Expression Builder only when the Allowed to Build Expressions? check box on the Results tab is selected.)

The system evaluates this expression when the decision rule returns based on the current row. The results of the evaluation are set as the new value of the property identified in this column.

Completing the Otherwise row

Optional. Complete the bottom row of the table to determine the result of the decision table when no higher row evaluates to true.

Field

Description

Otherwise  
Call base decision

This check box appears only for decision tables that are circumstance rules. When selected, the base (or non-qualified) decision tree of the same name, RuleSet, and Version is executed to obtain the result.

Actions

Enter the result to be returned to the application if none of the rows in the table evaluate to true.

Enter a constant, a property reference, or the keyword Call followed by a space and the name of another decision table. If results are restricted to those values listed on the Results tab, select from the choices presented.

You can enter values in this field only when the Allowed to Return Values check box is selected on the Results tab.

If this field is blank and no return value is computed from higher rows, the system returns a null value.

Note: During backward chaining computations for Declare Expression rules, if the Otherwise value can be computed, but properties needed for other parts of the form are not defined, the Otherwise value is returned as the value of the decision table

Using date properties as columns

A preferred way to include dates in a decision table is to use a property rather than a constant. Instead of a constant date, enter something like .myDateProperty as the value in the date column. However, to enter a fixed date as a condition in your table, use one of the following formats:

Application users need not match this format when they enter a date into a user form.

Entering an OR condition in a single cell

Often two rows of a decision table are identical except for the contents in one input column (to the right of the Return column).

To reduce the number of rows in the table, you can place two or more comparisons into a single cell.

The Insert Or Before () and Insert Or After
() buttons both apply the Java operator || for inclusive OR. The comparisons are presented stacked in a column within a single cell. The order is not significant, as the cell evaluates to true if any of the comparisons are true.