Event.Form.Variables
Event.Form.Variables hold variables that are available to any script on any event within this instance of the form object. Variables are created by adding a unique name after .Variables. Then this variable can be retrieved and used anywhere on this instance of the form. The Event.Form.Variables can hold all types of variable data including Strings, Numbers, Booleans, DateTimes, Arrays, and Objects.
Note: It is possible to store functions in Event.Form.Variables, but this is highly discouraged. Instead, it is better to hold commonly used scripts in separate files and use Script.Include(Path) to read and execute those scripts.
Applies To
Properties and Methods
None
Available
The .Variables object is available in:
- 15.03.016
- All newer builds
Note: The .Variables object and all sub-classes, properties, and methods are only available in Form Layout scripts.
Type
Object
Syntax
Event.Form.Variables;
Parameters
None
Example
Event.Form.Variables.MsgText = 'Hello World!';
Event.Form.MessageBox(Event.Form.Variables.MsgText);
/* Expected Prompt response:
Hello World!
*/