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


History

VersionStatusNotes
10.0UpdatedCarried over from Panorama 6.0 but does not have 255 character limit, and automatically grows in height to accomodate the specified text.