Adding Constraints to a Primary or Sub-Rule

The constraints of a rule specify the exact criteria specified within a rule that must be met for a match to occur.

It can include any attributes from the selected dataset, or any variables or thresholds captured on previous rules.

Constraints Tab

The Constraints tab enables you to specify constraints for a primary and any sub-rules you add to a rule pattern.

Figure 8-8 Edit Rule Dialog Box—Constraints Tab


Edit Rule Dialog Box—Constraints Tab

The Constraints tab contains the following elements:

  • Constraints: Specifies the exact criteria that the rule search must meet for matches to result. This fields requires a C-like syntax.
  • Comments: Provides additional information about the constraint defined within the rule.
  • Add Variable: Indicates the variables defined earlier in the pattern used to build your constraint. When clicked, a list displays all variables defined in the current rule or previous rules.
  • Add Attribute: Specifies the attribute within the specified dataset used to build your constraint. When clicked, a list displays all related attributes from which you can select.
  • Add Threshold: Specifies the thresholds within the scenario used to build your constraint. When clicked, a list displays all thresholds defined for the scenario.

To add constraints to a primary or sub-rule, follow these steps:

  1. From the Windows menu of the DataSet Editor, select Rule Patterns.

    The Rule Scenario Editor window displays.

  2. From the scenario navigation tree area, navigate to the desired pattern element.
  3. Double-click Primary Rule [DESCRIPTION] in the Pattern Editor area, or click Modify.

    Alternatively: Double-click Sub-Rule [DESCRIPTION] in the Pattern Editor area, or click Modify.

    The Edit Rule dialog box displays.

  4. Click the Constraints tab.

    The Constraints tab displays.

  5. Specify a constraint by doing any of the following:
    1. Click the Add Attribute button to select attributes you want as part of a constraint.
    2. Not applicable for Primary Rule: Click the Add Variable button to select variables you want as part of a constraint.
    3. Click the Add Threshold button to select thresholds you want as part of a constraint.
  6. Click Ok.

    The Constraints displays attributes, variables, and thresholds in the order added.

    Optional: Type any details you want to add to the constraint in the Comments field.

  7. Click Ok.

    The constraint string displays in the Constraints.