Understanding Event Rule Variables

Event rule variables are objects that you create based on the characteristics of a data dictionary field. However, the variables are not stored in the data dictionary. Rather, each variable exists only within the report where it was created. After you create the variable, it is available for use in event rules.

When you create an event rule variable, you indicate the scope. This table describes the scopes that are available for event rule variables:

Scope

Description

Report

Enables you to use the event rule variable in any event in any section of the report. Upon completion of the variable, the system adds a prefix of rpt to the variable name.

Section

Enables you to use the event rule variable in multiple events of the selected section. Upon completion of the variable, the system adds a prefix of sec to the variable name.

Event

Enables you to use the event rule variable in the event where it was created. Upon completion of the variable, the system adds a prefix of evt to the variable name.

The recommended naming convention for event rule variables is to include:

  • The Hungarian Notation at the beginning of the name.

  • The data item alias at the end of the name, preceded by an underline.

  • No spaces in the name.

For example, an event rule variable that you create using the Address Number data item might be named sec_mnEmployeeNumber_AN8. The letters sec indicate that the event rule variable is available in all events of the report section. The letters mn indicate that the field is a math numeric field type. These prefixes are added to the event rule variable name by the system. Employee Number is the name that the creator gave the variable. The characters AN8 indicate that the variable shares the same characteristics as the Address Number data item.