Variables supply rules (and rule conditions) with values for their Inputs and Outputs parameters. A variable can hold system-generated information that is likely to change at runtime; it can also hold a user-defined initial value (in effect, making it a constant) – but that value too may change, if desired, at runtime.

Variables can be used like any other data node. For example, they can be used to:
  • provide source data or hold target data in the Properties view's Inputs and Outputs areas.
  • hold a formula result, and then as a parameter to perform a second calculation.
  • hard-code an initial value into a document.
Note: Hard-coding an initial value in a Rule is somewhat like using a "constant," but there are no true constants in Clarify. An initial value defined in one Rule can still be overwritten if a later Rule affects the same node.

Variables can also be used as source or target values.

Variable panel

The Variables panel presents displays that can be used to populate rule properties. Variables contain data that does not appear in your local data files or incoming documents. From this panel you can add, edit, delete, expand or collapse variables. Existing Ruleset Data Objects (RDO) can also be added to the list of available parameters.

The panel contains different folders:
  • sys (System): Contains variables that capture Clarify program information, such as Collection List, Current Source Element, and Current date and time. As part of new transformation engine functionality , several of the variables within this folder have been removed and replaced with several new Actions and Variables, including DateTime, List, and Duration types.
  • glb (Global): Contains variables that you create within the Ruleset as well as any Ruleset Data Objects (which also contain variables).
  • env (Environment): Contains variables specific to the document syntax of the source Schema. For example, a Ruleset using an EDI Schema as its source contains variables such as Acknowledgement ID, Sender ID, and Version Release.

Creating Custom Variables

To create a custom (on-the-fly) variable, just click the Add Variable button and define the values (making sure nothing is already selected in the Variables panel). For more information, see String-type Variables, Number Variables, Boolean Variables, Object Variables, DateTime Variables, List Variables, Duration Variables, and StorageNode Variables.