Working with script types

You can create four types of script, using VBScript or JScript. Start scripts define actions that occur while the application is opening; Design Mode scripts control the structure of reports in Design Mode and View Mode scripts define user actions in View Mode. You can create one of each of these scripts. They cannot be renamed. You can create any number of user-defined scripts and include them in Start, Design and View Mode scripts.

Start scripts

These scripts are executed while Application Studio starts. They may trigger actions or access global variables.

This script generates a welcome text for the user and database according to the language chosen in Application Studio.

See Specifying the language.

@Language=VBSCRIPT cLan = GetGlobalVariable ("_CurrentLanguage")
if cLan = "German" then 
ShowInfo "Guten Tag "&GetGlobalVariable("_CurrentUser")
else 
ShowInfo "Hello "&GetGlobalVariable("_CurrentUser")
end if

Design Mode scripts

These are only executed in Design Mode. They can access events and objects of the Design Mode.

View Mode scripts

These are only executed in View Mode. They may access events and objects of the View Mode.

User-defined scripts

You can define scripts, or parts of scripts, for multiple use. You can open these scripts from within the start, Design Mode, and View Mode scripts.

Including scripts

To include a user-defined script into a script, open a start, Design Mode, or View Mode script and click Include script. Select the scripts you want to include.