Displays a dialog box, from which the user can choose a button.
Dial_Dialog ( switches ; prompt ; button1 ; button2 ; button3 ; button4 )
|switches||this determines the behaviour of the dialog and which information is returned|
|prompt||the text of the dialog|
|button1..4||the text of the 1st to the 4th button (from right to left)|
Switches can be empty or one of these:
|-NoteIcon||shows a note icon (indicating this dialog gives the user information)|
|-CautionIcon||shows a caution icon (indicating this dialog warns the user)|
|-StopIcon||shows a stop icon (indicating this is something severe which the user needs to address )|
|-CustomIcon||shows a custom icon. This icon needs to be set before with the Dial_IconControl function|
You can also add these switches:
|-IconSize=48||display the icon at 48×48 pixels|
|-StopOnESC||if you add this switch the user can press the ESC key to leave the dialog. The dialog returns with button 0|
Data type returned
The number of the button that was clicked.
Troi Dialog Plug-in 1.2
FileMaker Pro 16 to 19
If you specify an empty button text, no button will be displayed at that place.
See Dial_SetDialogTitle if you want to change the title of the dialog.
See also the functions Dial_GetInput and Dial_GetButton for easy parsing of the result.
This function does no longer implement the obsolete switches “input”, “password”, “userpassword”. When you use one of these switches the function returns the error -4243 = kErrNotImplemented. Please use the more versatile Dial_InputDialog function instead.
Set Variable [ $Result ; Dial_Dialog ( "-NoteIcon " ; "Hi, ¶¶Hello World" ; "OK" ; "Cancel" ; ) ]
This shows a dialog with a note icon. If the user chooses the OK button “1” will be returned. If the user chooses the Cancel button “2” will be returned.
We assume that in your FileMaker file the following fields are defined:
Name Text result Global, text
The Name field contains names of persons. Add the following script step:
Set Field [ result ; Dial_Dialog ( "-CustomIcon" ; "Hi, ¶The name is\"" & Name & "\"." ; "OK" ; ) ]
This shows a dialog with a custom icon and an OK button. The text of the field name is added, so you get something like:
The name is “Peter Baanen”.
Note the use of the \” to add the double quote to the calculation. The custom icon needs to be set in an earlier script step with the Dial_IconControl function.
Used in example file