Skip to main content

Show Alert Dialog (script step reference)

By November 18, 2021January 11th, 2023Online Help, Troi Dialog Plug-in
Troi Dialog Plug-in for FileMaker Pro

Show Alert Dialog

Displays an alert dialog with an optional informative text, from which the user can choose a button.

SyntaxScript step badge

Show Alert Dialog [ Select ; Result ; Message text ; Informative text ;
                    Button list ; Title; Custom icon; Switches ]


Select entire contents replaces the entire contents of a field with the result. If not checked the result replaces the currently selected portion of the field
Result the button clicked
Message text the main message text of the alert
Informational text (optional) extra and longer text, displayed in a smaller font
Button list a return separated list of button labels
Title (optional) the title of the alert, shown at the title bar of the dialog
Custom icon (optional) container with the icon to show
Switches this determines the behavior of the dialog and which information is returned


You can also add one or more of these switches:

-IconAsBadge (macOS only) shows the warning icon (exclamation icon) with the custom icon as a small badge
-ReturnButtonText return the *text* of the button, instead of the number

Returned Result

Data type returned



The number of the button. By adding switches this function can also return the text of the button.

The plug-in can also return an error code. Returned error codes can be:

$$-50 paramErr parameter error

Originated in

Troi Dialog Plug-in 10.1


FileMaker Pro 16 to 19


If all buttons have an empty button text an OK button will be displayed.
On macOS 11 (Big Sur) and later the alert will be shown with a card-like user interface, with most content center aligned. Also note that in this case buttons can be shown vertically. If you specify a Cancel button it will be shown as the bottom most button, but the returned button numbers will stay the same as if the buttons were oriented from right to left.

This script step currently does not have an equivalent function.


Show Alert Dialog [  $Result ; "We alert you to a small problem." ; 
                               "The internet is too big, please delete some of it now."; 
                               "OK" & "¶" & "Cancel" ;  "My Special Alert" ;   ;  ]

This will show a small alert dialog, with an informative text in a smaller font and two buttons.

Example 2

To show an alert with a custom icon create the following script:

Set Field [ gResult; "" // clear the result field first]

# Get the texts into variables:
Set Variable [ $MessageText ; "This is an alert dialog with this message text." ]
Set Variable [ $InformativeText ; "Here you can show extra info, in a smaller font." &
                                  "This can be a more elaborate explanation." ]
Set Variable [ $ButtonList ;   "OK" & "¶" & "Cancel" & "¶" & "3rd Button" & "¶" & "4th Button" ]
Set Variable [ $DialogTitle ;  "Troi Dialog Plug-in Special Alert" ]

# Get an icon from a (global) field:
Set Variable [ $CustomIcon ; gCustomIcon ]

# Now show the alert dialog:
Show Alert Dialog [ $Result ; Message: $MessageText ; Informative text: $InformativeText ; 
                              Button list: $ButtonList ; Title: $DialogTitle ; 
                              Custom Icon: $CustomIcon; Switches: "" ]

# Save the result into a field:
Set Field [ gResult; $Result ]

Exit Script [ Result: $Result ]

Used in example file


Related script stepScript step badge

Show Flash Dialog

Related functionsFunction badge


Related topics

Troi Dialog Plug-in online help (overview)

Online Help Page for Troi Dialog Plug-in for 16 to 19 –> Show Alert Dialog (dialp7322) 2023-0111 15:23:25