contents.gifindex.gif

Assign_With_AfterChange

Purpose

Assigns the result of <Assign_Expr> to <Rules_Var> (which is typically the quoted name of a rules variable).

Arguments

Assign_With_AfterChange(

<Rules_Var>
// A string with a valid rules engine variable name or an expression which returns a string which is a valid rules engine variable name.
, <Assign_Expr>
// An expression, number, variable, or quoted string which when evaluated, provides the value to be stored in <Rules_Var>.
, <Expr_List>
// One or more expressions in an expression list format.
)

Notes

If the value of <Rules_Var> changes, then <Expr_List> is evaluated as an AfterChange event. The result return is the value of <Rules_Var> at the end of the function (including anything which <Expr_List> may have done to <Rules_Var>).

There are two reasons you might want to use this function:

traxhelp00090000.gif if you want to improve performance by only evaluating an expression when a value changes

traxhelp00090000.gif if you need to evaluate one or more expressions whenever a value changes.

Example

A variable named zip has the value of 90276

Assign_With_AfterChange( zip, 90275, [] )