Using constants in rules and rule templates

To add constants to rule expressions, use one of the following:

  • For workflow rulesWorkflow Expression Editor dialog box.
  • For rule templatesEdit Rule Template dialog box > Definitions tab.
  • For data-entry rulesRule Wizard Expression tab > Constants tab.
  • For global conditionsEdit Global Conditions dialog box > Constants tab.

Note:

RefNames for constants used in both a study and a library are not updated in both places if you update the RefName of the constant. If you update a RefName in one location, you must manually update it in the other.

The Constants tab (on the Expression tab of the Rule Wizard) lists all constants created in the study and in the libraries that appear in the Libraries List in the Study Editor. Any rule on any study object can reference any constant that appears.

Constants are organized in folders according to their classification. A classification is a user-defined value provided when a constant is created.

The list of constants is ordered in the following way:

  1. Constants defined in the study.
  2. Constants published in the first library on the Library List.
  3. Constants published in the second library on the Library List (and so on).

You can publish special versions of constants from different libraries and allow the order of libraries in the Library List to determine which constant appears first.

For example, if you have two constants with matching names and data types, you see only the constant from the higher library in the Library List (or, if you have a local copy, in the study).

To include a constant in a rule expression:

  • Drag the constant from the Constants tab to the Expression workspace.