| Components | All | New | MacOS | Windows | Linux | iOS | ||||
| Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old | |
Dialog.GetButtonPressed
Queries index of selected button.
| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
| Dialog | 7.2 | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |
MBS( "Dialog.GetButtonPressed" )
Parameters
none
Result
Returns number or error.
Description
Queries index of selected button.Value is negative If not applicable.
Index is 0 for first button.
Examples
Run dialog with one Let statement:
Let (
[
_ = MBS("Dialog.Reset") ;
_ = MBS("Dialog.SetDefaultButton" ; "Yes") ;
_ = MBS("Dialog.SetOtherButton" ; "No") ;
_ = MBS("Dialog.SetAlternateButton" ; "Cancel") ;
_ = MBS("Dialog.SetMessage" ; "Delete the old file?") ;
_ = MBS("Dialog.SetWindowTitle" ; "Backups done") ;
_ = MBS("Dialog.Run") ;
button = MBS("Dialog.GetButtonPressed")
] ;
// 0 -> Yes, 1 -> No, 2 -> Cancel
button
)
[
_ = MBS("Dialog.Reset") ;
_ = MBS("Dialog.SetDefaultButton" ; "Yes") ;
_ = MBS("Dialog.SetOtherButton" ; "No") ;
_ = MBS("Dialog.SetAlternateButton" ; "Cancel") ;
_ = MBS("Dialog.SetMessage" ; "Delete the old file?") ;
_ = MBS("Dialog.SetWindowTitle" ; "Backups done") ;
_ = MBS("Dialog.Run") ;
button = MBS("Dialog.GetButtonPressed")
] ;
// 0 -> Yes, 1 -> No, 2 -> Cancel
button
)
See also
- Dialog.GetButton
- Dialog.Reset
- Dialog.Run
- Dialog.RunSheet
- Dialog.SetAlternateButton
- Dialog.SetButton
- Dialog.SetDefaultButton
- Dialog.SetMessage
- Dialog.SetOtherButton
- Dialog.SetWindowTitle
Release notes
- Version 7.2
- Added Dialog.GetButtonPressed function.
Blog Entries
- Dialogs with fields for Windows
- MBS FileMaker Advent calendar - Door 12 - Sending Mails
- MBS Plugin Advent calendar: 17 - Dialog
- MBS FileMaker Plugin, version 7.2pr3
This function is free to use.
Created 6th April 2017, last changed 21st February 2026
MarkDown version: DialogGetButtonPressed.md