MSM-Workstation
Macros

Go back to the alphabetic list of macros
Go back to the first page of this tutorial

%%GetVar ( TiedVariable )

Retrieve the value displayed in a control on a window by referring to its local variable.

TiedVariable A local variable tied to a control on a window.

The %%GetVar macro is used to refer to controls by means of local variables associated with the control via the VarName property. The name specified in TiedVariable is used to look up the runtime window and control to which it refers, and the Value of that control is retrieved and set into TiedVariable. If the display format and/or validation defined for the associated control maintain a distinction between the internal and external form of the control's value, The local variable specified by TiedVariable contains the internal form, and TiedVariable("X") the external.

This macro is used internally by the compiler and shouldn't need to be used explicitly because the TiedVariable will already be correctly updated.

Examples

%%GetVar(TESTNO)
Find the control associated with variable TESTNO, retrieve its value and place that value into variable TESTNO.

See also

%%SetVar and %%ResetVar.