Adding Bindings to a Primary or Sub-Rule
Bindings are variables captured in a pattern; they are used for:
- Storing information from one record to compare against another.
- Tracking running counts or aggregate amounts across multiple records.
- Defining highlights.
Bindings Tab
Use the Bindings tab to specify bindings for any rules and sub-rules that you add to the rule pattern.
Figure 8-9 Edit Rule Dialog Box—Bindings Tab

Variables can use conditional (if/then/else) logic. Proper syntax for a bound threshold expression is: cond(<condition>;<value>;<default value>)
You can also string together conditional statements, as follows:
cond(<condition 1>;<value 1>;<condition 2>;...;<condition n>;<default value>)
Note:
Use conditional expressions only within sum and average aggregate functions.The Bindings tab contains the following elements:
- Variable and Expression: Lists all variables and their definitions (expressions) that a rule defines.
- Name: Enables you to specify the attribute to add to a rule (the attribute must be in all of the datasets you previously selected).
- Expression: Specifies the bindings expression you want to add to a rule.
- Comment: Specifies any additional information about the bindings.
- Add Variable: Opens the Variable Selector dialog box, in which you can use another binding to define the current binding.
- Add Attribute: Opens the Attribute Selector dialog box, in which you can add attributes from the current dataset for use in defining the current binding.
- Add Threshold: Opens the Threshold Selector dialog box, in which you can add a threshold from the current scenario for use in defining the current binding.
- Add: Saves any new bindings to a rule.
- Delete: Deletes a rule binding.
- Modify: Saves any changes you made to an existing rule binding.
- Move Up: Scroll binding upward.
- Move Down: Scroll binding downward.
When you create a new rule scenario (through the Rule Scenario Editor Scenario menu), the Primary Rule for the scenario displays in the Pattern Editor area.
To add bindings to a primary or sub-rule, follow these steps:
- From the Windows menu of the DataSet Editor, select
Rule Patterns.
The Rule Scenario Editor window displays.
- From the scenario navigation tree area, navigate to the desired pattern element.
- 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.
- Click the Bindings tab.
The Bindings tab displays.
- Type the name of the variable to be bound to the selected rule in the Name field.
- Specify a binding by doing any of the following:
- Click the Add Attribute button to select attributes you want as part of a binding expression.
- Not applicable for Primary Rule: Click the Add Variable button to select variables you want as part of a binding expression.
- Click the Add Threshold button to select thresholds you want as part of a binding expression.
The attributes, variables, and thresholds display in the Expressions field in the added order.
- Click OK. Added bindings display in the
Bindings list box.
Optional: Type any additional information you want to associate to the selected rule in the Comment field.