Rule Builder > Managing Decision Tables > Partition Item Editing Operations > Editing a Partition Item

Once a partition item is created, you can use in-place editing to edit the value of the partition item. The appropriate value editor is available within the cell or in an automatic pop-up window to input the value.
Note
If you are using a custom value editor, it will only be available within the cell value editor and not when you double-click on a cell.

Examples are shown in Figure 12.22.

images/edit.gif

images/edit2.gif

Figure 12.22    In-Place Cell Editing

You can also use the Partition Item Editor, opened through the shortcut menu to edit the cell value as well as its associated predicate.
Important
In the Partition Item Editor, you can only enter values in the Value text box using <enter a value>. Other choices available in BAL such as field values cannot be used.

Figure 12.23 shows an example of how to set date values using the Is Between predicate.

images/dtable2.png

Figure 12.23    Partition Item Editor -- Setting Date Values

Figure 12.24 shows an example of how to set interval values. Note the change in the predicates displayed.

images/pieditor.png

Figure 12.24    Partition Item Editor -- Setting an Interval

In this dialog box, you can enter values of the cell using a dedicated syntactic editor. You can choose the predicate associated with the cell using a predicate chooser whose content depends on the type of column.

This section has the following subsections:

Editing the Operator of a Partition Item

By default, a partition item is associated with the predicate that has been chosen for the column. If the predicate chosen for the column does not appear in the Operator panel of the Partition Item Editor, it is displayed as the default, see Figure 12.25. You can either use the default value or change to one of the predicates in the list.

images/dtable3.png

Figure 12.25    Partition Item Editor With Default Predicate Displayed

By default, a partition item is associated with the predicate that has been chosen for the column.

You can override any predicate for a selected partition item by choosing another operator as follows:

A bullet indicates the operator that is currently used for the cell. When the partition item operator is different from the one associated with the column, this predicate is displayed in a cell, using a predefined format.

In the example shown in Figure 12.27, as the last cell of Customer Age overrides the column predicate (isBetween is used for the column and isGreaterThan is used for this cell), the operator is displayed.

images/override.gif

Figure 12.27    Sample Operator Edit of a Partition Item

The condition generated will be:

  • If the age of customer is greater than 20
  • Whereas the condition for the previous line is:

  • If the age of customer is between than 11 and 20
  • Note
    When you assign an operator for a cell that is different from the one specified for the column, the symbol related to this operator is added (">" in the cell >20, for example). A cell overriding the default operator is automatically assigned this formatting.
    Important
    Being able to override the predefined operator on a cell is only available for primitive types, such as Number, String, Date, and Boolean. For any other type you can only select the is, is not, is in, or is not in operator for the cell.

    Editing Collection Values

    Selecting the in operator on a cell (or column) allows you to enter a list of values instead of a single value.

    This ability allows grouping choices to apply a common set of actions.

    For example, row 3 in Figure 12.28 shows the collection "Silver, Gold, Platinum."

    images/collexample.gif

    Figure 12.28    List of Values in a Cell
    Example Using the Operator Panel

    In the example in Figure 12.27, if you wanted to handle Silver and Platinum in the same way, you could perform the following steps:

    1. Assign the in operator to the Silver cell (Figure 12.29).
    2. Edit the cell to add Platinum to the list (Figure 12.30).

    3. images/coll1.gif
    4. Figure 12.29    Changing the Operator to `in'

    5. images/col2.png
    6. Figure 12.30    Partition Item Editor -- Adding a List Value

    The resulting cell will be as shown in Figure 12.31.

    images/col3.gif

    Figure 12.31    Resulting Collection Value
    Using In-Place Editing

    Note that you can select this collection using the shortcut in-place collection editor. For domains, this editor allows you to check values that should be part of the collection, as shown in Figure 12.32.

    Collecting Nondomain Values

    For types that are not domain (String, number, and so forth), you can create a list of values in-place by entering values separated by a semicolon (;) as shown in Figure 12.33. For complex types, the only way to edit the collection is through the Partition Item Editor.

    images/col5.gif

    Figure 12.33    Example In-Place List of Values

    Tip
    A common way of creating collections is by merging several partition items. All merged values become an element of a newly created collection.

    See Also

    Decision Table / Tree Predicates


    Customer Support | Copyright © 1987-2004 ILOG S.A. All rights reserved. Legal terms. PREVIOUS   NEXT