Returns the number of the button clicked in the last dialog shown.
Dial_GetButton ( switches )
|none||please leave empty for future use|
Data type returned
The number of the button clicked in the last dialog shown.
Troi Dialog Plug-in 3.0
FileMaker Pro 12 to 17
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.
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