Alert Objects
- Last UpdatedNov 13, 2025
- 2 minute read
The ALERT object provides a simple way of giving a warning or getting a response from the user, avoiding the necessity of creating a separate form. Where an alert needs a simple acknowledgement by the user, this can be achieved by pressing the spacebar or the Enter key on the keyboard.
Note: Alerts are always blocking: they prevent interaction with any other form until they have been actioned.
Below are some examples of how you can define different kinds of alerts:
|
Code |
Effect |
|---|---|
|
!!Alert.Error( 'You cannot do this!' ) |
Defines a simple error alert with an acknowledge button at the current cursor position: Note that the result, which is always 'YES', has here been discarded |
|
!!Alert.Message( ‘Saving your data now') |
Displays a message alert with an acknowledge button at the current cursor position: |
|
!!Alert.Warning( ‘Do not press this button again!' |
Displays a warning alert with an acknowledge button at the current cursor position: |
|
!Answer = !!Alert.Confirm( ‘You can’t be serious!’ ) |
Displays a confirm alert at the current cursor position. This example comes up with two buttons: ‘YES’ and ‘NO’ , delivering the corresponding text as the string result. |
|
!Answer = !!Alert.Question( ‘OK to format entire disc?’ ) |
Displays a question alert at the current cursor position: This example comes up with three buttons: ‘YES’, ‘NO’ and ‘CANCEL’ delivering the corresponding text as the string result. |
|
!Answer = !!Alert.Input( ‘Type Item code: ’,'P10101' ) |
Displays an input alert at the current cursor position: The first string appears as the prompt, and the second string is the default entry in the text box if the user does not supply a value. |