Dial_GetButton (function reference)

By October 1, 2019 October 13th, 2019 Online Help, Troi Dialog Plug-in
Troi Dialog Plug-in for FileMaker Pro

Dial_GetButton

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

SyntaxFunction badge

Dial_GetButton ( switches )

Parameters

noneplease leave empty for future use

Returned Result

Data type returned

Text

Result

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

Originated in

Troi Dialog Plug-in 3.0

Compatibility

FileMaker Pro 14 to 18

Considerations

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.

Example

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

Dial_BigInputDialog
Dial_Dialog
Dial_GetButton
Dial_GetInput
Dial_InputDialog
Dial_ListDialog

Related topics

Troi Dialog Plug-in online help (overview)


Online Help Page for Troi Dialog Plug-in for 14 to 18 –> Dial_GetButton (dialp4304) 2019-1013 19:01:08