Dial_Dialog (function reference)

Troi Dialog Plug-in for FileMaker Pro

Dial_Dialog

Displays a dialog box, from which the user can choose a button.

SyntaxFunction badge

Dial_Dialog ( switches ; prompt ; button1 ; button2 ; button3 ; button4 )

Parameters

switchesthis determines the behaviour of the dialog and which information is returned
promptthe text of the dialog
button1..4the text of the 1st to the 4th button (from the right to left)

Switches

Switches can be empty or one of these:

-NoteIconshows a note icon (indicating this dialog gives the user information)
-CautionIconshows a caution icon (indicating this dialog warns the user)
-StopIconshows a stop icon (indicating this is something severe which the user needs to address )
-CustomIconshows a custom icon. This icon needs to be set before with the Dial_IconControl function

You can also add these switches:

-IconSize=48display the icon at 48×48 pixels
-StopOnESCif you add this switch the user can press the ESC key to leave the dialog. The dialog returns with button 0

Returned Result

Data type returned

Text

Result

The number of the button that was clicked.

Originated in

Troi Dialog Plug-in 1.2

Compatibility

FileMaker Pro 12 to 16

Considerations

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.

Example

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.

Example 2

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:
Hi,
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.

Related functionsFunction badge

Dial_GetButton
Dial_IconControl
Dial_SetDialogTitle

Related topics

Troi Dialog Plug-in online help (overview)


Online Help Page for Troi Dialog Plug-in for 12 to 16 –> Dial_Dialog (dialp4302) 2017-1022 18:55:05