Dial_GetButton (function reference)

By November 1, 2020November 9th, 2020Online Help, Troi Dialog Plug-in
Troi Dialog Plug-in for FileMaker Pro


Returns the number of the button clicked in the last dialog shown.

SyntaxFunction badge

Dial_GetButton ( switches )


none please leave empty for future use

Returned Result

Data type returned



The number of the button clicked in the last dialog shown.

Originated in

Troi Dialog Plug-in 3.0


FileMaker Pro 15 to 19


This function makes it easy to get the button number of a dialog that returns multiple results.

The button number is saved by the plug-in until a next dialog is displayed. Please be aware that each dialog function of the plug-in resets the number. Dialogs that have no buttons will set the button number to 0. (This is to be able to extend the functionality of these functions in the future).

When the FileMaker application stops, the saved button number is reset to 0.

See also the function Dial_GetInput.


Set Field [ gUserChoice ; Dial_GetButton ( "" ) ]

This will return the number of the button clicked, for example 3.

Example 2

This example will show a password dialog. We assume that in your FileMaker file the following field is defined:

result     	Global, text

Add the following script steps:

Set Field [ result ; Dial_InputDialog ( "-StopIcon -StartField2 -Bullet2" ; 2 ;
                            "Please enter your name and password:" ; "OK" ; "Cancel" ) ]
If [ Dial_GetButton ( "" ) = 1 and Dial_GetInput ( "-text1" ) = "sesame" ]
  ... do your secret stuff here...
End If

Related functionsFunction badge


Related topics

Troi Dialog Plug-in online help (overview)

Online Help Page for Troi Dialog Plug-in for 15 to 19 –> Dial_GetButton (dialp4304) 2020-1109 17:46:18