Using MetaScript to Automate Actions

Using MetaScript to Automate Actions

Virtual Ticket) includes a built-in scripting language called MetaScript. MetaScript is based upon the JavaScript language, but adds numerous objects and functions specific to the Virtual Ticket operating environment. Detailed information about the MetaScript language can be found in the MetaScript Reference manual.

MetaScript may be used in any Virtual Ticket form in the following two types of scripts:

Global Script—A global script is defined for each form in the Virtual Ticket system (when a form is created, this script does not contain any commands or function definitions). The global script of a form is executed only once - when the form is loaded in Virtual Ticket. The script is called "global" because the functions it defines are global within the scope of the form - i.e. functions defined within the Global MetaScript of a form may be called from the scripts defined for individual form fields.

Field Element Scripts—For certain types of form fields (text entry fields, radio buttons, check boxes, and popups), MetaScript may be employed to specify how the form field should be dynamically calculated by Virtual Ticket. These field element scripts are used to calculate the values of variables, the default values placed in database fields, and the contents of popup lists each time a Virtual Ticket user adds or updates a database record using the form. The functions defined within a particular form object script may only be used within that script; they are not available within the form's Global MetaScript or other form object scripts.



::Related Topics
:: Formatting & Designing Forms


Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.