message
message
TEXT

The message statement displays a modal alert window with a message.

Parameters

This statement has one parameter:

text – is the message to display.

Description

The message statement displays a message. The message is displayed in an alert with one button: OK. The message stays on the screen until the user presses the default OK button (or presses either the Return or Enter key), then the procedure continues with the next statement.

Use the message statement when you need to temporarily display an important message. Don’t overdo it, because the message alert can be very annoying if used too often. The message statement doesn’t give the user any choices. If you need to display a message and give the user a choice, use the alert, okcancel, cancelok, yesno or noyes statements.

Previous versions of Panorama limited the amount of text displayed to 255 characters, but this restriction no longer applies. The alert will grow in height so that all of the text is displayed (unless of course the text is too large to fit on the entire screen). (Note: Unlike previous versions of Panorama, you cannot control the dimensions of the alert with the customalert statement. If you want a custom alert, see the superalert statement. Also, unlike previous versions, even if the message is empty, the alert will now still open but be blank).

This example uses the message statement to inform the user that the requested operation cannot be performed.

    if Transaction="Deposit"
        message "Sorry, deposits cannot be deleted."
    else
        deleterecord
    endif

This example uses a formula to build a complex message. The message will be something like The database contains 12 deposits for a total of $3,932.67.

    local quickTotal,quickCount
    formulasum quickCount,?(Transaction="Deposit",1,0)
    formulasum quickTotal,?(Transaction="Deposit",Amount,0)
    message "The database contains "+
        pattern(quickCount,"# deposit~")+
        " for a total of "+pattern(quickTotal,"$#,.##.")

Note: If the text is too large to be displayed on the screen, the OK button may not be visible. You can still close the alert by pressing either the Return or Enter key. If you need to display a large amount of text, we recommend using the superalert or displaydata statements, which can include a scroll bar.

See Also

- activegrid -- manages the operation of a grid that controls a series of options.
- alert -- displays a modal alert window with a message and one or more buttons.
- alertcanceldelete -- displays a modal alert window with a message and two buttons: *Cancel* and *Delete*.
- alertcancelok -- displays a modal alert window with a message and two buttons: *Cancel* and *Ok*.
- alertdeletecancel -- displays a modal alert window with a message and two buttons: *Delete* and *Cancel*.
- alertmodal -- displays a modal alert sheet (not attached to any window) with a message and one or more buttons.
- alertnoyes -- displays a modal alert window with a message and two buttons: *No* and *Yes*.
- alertok -- displays a modal alert window with a message and one button: *Ok*
- alertokcancel -- displays a modal alert window with a message and two buttons: *Ok* and *Cancel*.
- alertoksmall -- displays a modal alert window with a message and one button: *Ok*
- alertrevertcancel -- displays a modal alert window with a message and two buttons: *Revert* and *Cancel*.
- alertsavecancel -- displays a modal alert window with a message and two buttons: *Save* and *Cancel*.
- alertsheet -- displays an alert sheet (attached to the current window) with a message and one or more buttons. Note: with the introduction of OS 11, Big Sur, sheets no longer appear to slide down from the title bar, but open a dialog centered on the active window.
- alertyesno -- displays a modal alert window with a message and two buttons: *Yes* and *No*.
- alertyesnocancel -- displays a modal alert window with a message and three buttons: *Yes*, *No* and *Cancel*.
- analyzedialog -- opens the standard Analyze dialog.
- beep -- makes the computer speaker beep once.
- bigmessage -- displays a message alert.
- cancelok -- displays a modal alert window with a message and two buttons: *Cancel* and *Ok*.
- choosefiledialog -- displays a modal dialog allowing selection of files or folders.
- choosefolderdialog -- pauses and displays the standard “choose folder” dialog.
- closeallasyncprogresswindows -- closes any asynchronous progress windows.
- columnstatsdialog -- opens the standard Column Stats dialog.
- customdialog -- customizes the appearance of the gettext and getscrap dialogs.
- databaseoptionsdialog -- opens the standard Database Options dialog.
- editfavoritesdialog -- handles the Favorites button in a dialog.
- favoritedatabasedialog -- opens the standard Favorite Databases dialog.
- favoritesbutton -- handles the *Favorites* button in a dialog.
- getscrap -- will display a dialog with a text entry area. The entered text is placed in the clipboard.
- getscrapok -- will display a dialog with a text entry area. The entered text is placed in the clipboard.
- gettextdialog -- displays a configurable modal dialog that asks the user to enter an item of text.
- gettextokcancel -- displays a modal dialog that asks the user to enter an item of text.
- giantmessage -- displays a message alert.
- importdatabasedialog -- opens the standard Import Database dialog.
- info("modaldialogopen") -- returns true if a modal dialog window is currently open.
- joindialog -- opens the standard Join Database dialog.
- morphalldialog -- opens the standard MorphAll dialog.
- morphdialog -- opens the standard Morph dialog.
- noyes -- displays a modal alert window with a message and two buttons: *No* and *Yes*.
- nsnotify -- delivers a notification.
- okcancel -- displays a modal alert window with a message and two buttons: *Ok* and *Cancel*.
- openasyncprogresswindow -- opens a floating progress window for asynchronous operations (urltask(, timers).
- openfiledialog -- pauses and displays the standard “open file” dialog.
- progressalert -- displays a progress alert if an operation is going to take a long time.
- rudemessage -- displays a message alert.
- savedialog -- displays a modal dialog that allows a user to specify the name and location of a new file.
- savefiledialog -- pauses a procedure and displays the standard “save file” dialog.
- selectduplicatesdialog -- opens the standard Select Duplicates dialog.
- showhidefieldsdialog -- opens the standard Show/Hide Fields dialog (in the Fields menu).
- sortdialog -- opens the standard *Sort* dialog.
- statusmessage -- displays a message in the status bar at the bottom of the procedure window.
- stopalert -- displays a modal alert window with a warning icon, a message and one or more buttons.
- supergetpassword -- will display a dialog with a text entry area for a password.
- supergettext -- will display a dialog with a text entry area.
- tallmessage -- displays a message alert.
- yesno -- displays a modal alert window with a message and two buttons: *Yes* and *No*.

History

Version | Status | Notes
10.0 | Updated | Carried over from Panorama 6.0 but does not have 255 character limit, and automatically grows in height to accomodate the specified text.