Variable Level (Magic xpa 4.x)
The option available for the Variable level is the Variable Change logic unit, which lets you handle the change of a variable's value. The Variable Change logic unit is triggered whenever the variable value is changed.
OLE and .NET variables cannot be used in the Variable Change logic unit.
The Variable Change logic unit is not supported in Browser tasks.
When the Variable level is selected, Magic xpa displays Change in the combo box.
When you click in the Var column, the Variable list appears. The Variable list displays variables from the current data view. You cannot select variables from handlers or functions.
When entering the Variable Change for the first time, Magic xpa prompts you to add two parameters. If you select Yes, the following parameters are added:
CHG_REASON_<variable name> – A Numeric variable with a picture of 2. This parameter stores the reason that the engine entered this handler, using the following numeric values:
-
0 – Interactive. The change is a result of editing a value of a control on the form.
-
1 – Non-interactive. The change is a result of a non-interactive change, such as the recompute mechanism or the variable being updated.
CHG_PRV_<variable name> – This parameter stores values of the variable before the recompute mechanism began.
Note: If you change the variable in the Var property, and the attribute is different (for example, Numeric to Alpha), you need to make the necessary changes.
Variable Change Properties
Variable Runtime Behavior
Variable Change and Recompute
Level Function
MainDisplay Function