Text string format

Get to know the format and structure of text strings used in rule procedures.

When you define a text string within a command, you must enclose the text within double quotation marks. For example, to assign a variable NOTETOADMIN to equal the text string “Don’t forget to update this section next month when our reports change!”, you would create the variable NOTETOADMIN and then assign it as follows:

NOTETOADMIN = “Don’t forget to update this section next month when our reports change!”

If you include a variable that is not enclosed in double quotation marks within a text string, the variable’s value is written out. For example, if a numeric variable is defined as TOTAL=1229, the two commands shown for string variable SUBTOTAL in the table below have very different meanings:

Variable Type

Assignment Type

SUBTOTAL = TOTAL

One of the following:

  • If SUBTOTAL is defined as a numeric variable, this expression returns the value of SUBTOTAL as 1,229.
  • If SUBTOTAL is defined as a string variable, this expression returns an error.

SUBTOTAL = “TOTAL”

One of the following:

  • If SUBTOTAL is defined as a numeric variable, this expression returns an error.
  • If SUBTOTAL is defined as a string variable, this expression returns the value of SUBTOTAL as “TOTAL”.

If you want to concatenate multiple values and text strings into one long text string, precede each concatenated 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 + “.”

When that rule procedure is run against a report, the variable ERRMESSAGE might contain this string value:

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