Was this helpful?
Types of Escape Code
An escape code's type indicates the point at which the code is executed when the application is run. Certain types of escape code can be used only with specific frame types, as indicated in the following table.
The following table describes the types of escape code that are available in Vision:
Escape Type
When Executed
Frame Types
Form-Start
When the form is displayed
Menu, Append, Browse, Update
Form-End
After the user selects End (and provides confirmation when required), but before exiting a form
Menu, Append, Browse, Update
Query-Start
Before a query is run, just before the "Selecting Data..." message appears in the window
Browse, Update
Query-New-Data
After new data (Master records and any matching Detail records) are retrieved from the database, but before the user sees the data
Browse, Update
Cannot use this escape type on a frame whose Master table is displayed as a table field.
Query-End
After all records (or no records) are returned by the query, and the user has exited the Go submenu
Browse, Update
Append-Start
After a user enters data on the form, before data is inserted in database
Append and Update (if appends are allowed)
Append-End
After a user enters data on the form, after data is inserted in database
Append and Update (if appends are allowed)
Update-Start
After a user enters data on the form, before the database is updated
Update
Update-End
After a user enters data on the form, after the database is updated
Update
Delete-Start
After a user enters data on the form, before data is deleted from database
Update (if deletes are allowed)
Delete-End
After a user enters data on the form, after data is deleted from database
Update (if deletes are allowed)
Menu-Start
After the user selects a specific menu item, before the called frame is displayed
Menu, Append, Browse, Update
Menu-End
After returning from the frame called by the specified menu item
Menu, Append, Browse, Update
Before-Field-Entry
When the user enters a form field
Menu, Append, Browse, Update
After-Field-Change
When the user exits from a field, if the user typed a value into the field. The code is not activated if the value of the field is changed in another way, such as selecting a value using the ListChoices menu item.
Menu, Append, Update
After-Field-Exit
When the user exits from a field; if the field also has Field-Change trigger code, the Field-Change code executes first
Menu, Append, Update
TableField-Menuitem
When the user selects the menu item from the menu
Menu frames with table-field menus
Menuline-
Menuitem
When the user selects the menu item from the menu
Menu, Append, Browse, Update
Before-Lookup
When the user selects ListChoices, or another action which calls a lookup table, before the lookup table is displayed
Append, Browse, or Update frames which have lookup tables in their visual query
After-Lookup
When the user selects ListChoices, or another action which calls a lookup table, after the lookup table is displayed and before returning to the calling frame
Append, Browse, or Update frames which have lookup tables in their visual query
On-Timeout
When the user has been idle for the specified timeout period. The default period is 300 seconds.
You can change the timeout period in the template files, or by using escape code. For example, in Form-Start escape code:
set forms frs (timeout=200)
Menu, Append, Browse, Update
On-Dbevent
When a specified dbevent occurs. The event must be a registered dbevent. You must register the event in the application by including a register dbevent statement, usually through Form-Start escape code. For more information on dbevents, see the 4GL reference part of this guide.
Menu, Append, Browse, Update
Last modified date: 11/09/2022