ASSIGNMENT command

Set any user variable or select a subset of system variables equal to a specific value using the ASSIGNMENT command.

The ASSIGNMENT command takes the following format:<VariableName> = [arithmetic expression]
Note: Variables should be entered within square brackets [ ].

For example, you may want to calculate a total monthly expense amount by iteratively adding individual expenses to the total. Assume that your policy extracts an ITEM_COST field from a report and this variable returns the cost of individual expense items as they are listed sequentially in the report. In this case, you could define a variable called MONTHLY_EXPENSES and set MONTHLY_EXPENSES = [MONTHLY_EXPENSES] + [ITEM_COST]. This would iteratively calculate your monthly total.

Note: You may also assign values to variables through indirect assignment, where a variable is used within a function or command.
Within a rule procedure, the current value of the application cycle is stored in a variable called APPLICATION_CYCLE. The value of the cycle for which you run a given rule procedure is stored. You can use any of the following methods to set the cycle within a rule procedure:
  • CURRENT_CYCLE=20030101
  • CURRENT_CYCLE=CURRENT_CYCLE(1)
  • APPLICATION_CYCLE=SYSTEM_DATE

To define an ASSIGNMENT command that sets a variable to a specific value:

  1. On the Rule tab, from the COMMANDS drop-down, drag and drop the ASSIGNMENT command to the Working Canvas.
  2. Optionally, in the Comment text box, enter any descriptive comments you want to include for the rule procedure you are defining.
  3. In the drop-down list, to the left of the “=” symbol, you can select an existing variable or enter a new variable to which you wish to assign a value.
  4. In the field to the right of the “=” symbol, enter the value you wish to assign to the variable you selected. Or, you can drag and drop parameters from the Primitives Panel.

    You can assign values of these assignment types. The command assigns a value to an existing or a new variable.

    Variable Type

    Assignment Type

    String

    Either of the following:

    • Text string. All characters except square brackets [] are allowed.
    • Concatenated text string (see below).

    Numeric

    Either of the following:

    • Numeric value.
    • Complex arithmetic expression—Use the mathematical operators to enter more complex arithmetic expression.

    Date

    • Date in format as seen in DATE_FORMAT OPTIONS in the Primitives Panel.

    Cycle

    Either of the following:

    • Cycle value.
    • Date in format YYYYMMDD
  5. Click OK.
  6. If you have entered a new variable, a Variables pop-up appears with the new variable name in the Name text box. From the Type drop-down, select the required data type.
    ASSIGNMENT Command 1
  7. Click Save.

You can also assign a function to a variable using the ASSIGNMENT command as shown below:

ASSIGNMENT Command 1

Concatenated Text String:

If you want to concatenate multiple values and text strings into one long text string, precede each concatenation item with a “+” sign. For example, you might define the string variable ERRMESSAGE as follows in your rule procedure:

ERRMESSAGE = “Error in account” + [ACCOUNT]+ “, office” +[OFFICE] + “, is” + “$” + [ERRORAMT] + “.”

If you output ERRMESSAGE to the Log, it contains the following string value:

Error in account 07712873, office San Francisco, is $37.59.