| Components | All | New | MacOS | Windows | Linux | iOS | ||||
| Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old | |
Dialog.Run
Runs the dialog.
| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
| Dialog | 4.1 | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |
MBS( "Dialog.Run" )
Parameters
none
Result
Returns OK or error.
Description
Runs the dialog.Returns which button was pressed.
On Windows may return Abort, Cancel, Continue, Ignore, No, OK, Retry, Try Again or Yes.
On Mac returns text of the buttons clicked.
Version 6.2 adds new capabilities for Windows including custom buttons, timeout, suppression checkbox and icon.
Examples
Show dialog with 7 buttons:
Set Variable [ $r; Value: MBS("Dialog.Reset") ]
Set Variable [ $r; Value: MBS("Dialog.SetButton"; 0; "Send All Copies to US") ]
Set Variable [ $r; Value: MBS("Dialog.SetButton"; 1; "Send All Copies to the Informant") ]
Set Variable [ $r; Value: MBS("Dialog.SetButton"; 2; "No Copies are required") ]
Set Variable [ $r; Value: MBS("Dialog.SetButton"; 3; "Reorder copies and send them to Informant”)]
Set Variable [ $r; Value: MBS("Dialog.SetButton"; 4; "Reorder copies and send them to US”)]
Set Variable [ $r; Value: MBS("Dialog.SetButton"; 5; "Reorder and send to US") ]
Set Variable [ $r; Value: MBS("Dialog.SetButton"; 6; "Town Hall Form Only”)]
Set Variable [ $r; Value: MBS("Dialog.SetButton"; 7; “Cancel”) ]
Set Variable [ $r; Value: MBS( "Dialog.SetMessage"; "Hello World" ) ]
Set Variable [ $r; Value: MBS( "Dialog.SetWindowTitle"; "test" ) ]
Set Variable [ $r; Value: MBS( "Dialog.Run" )]
Set Variable [ $button; Value: MBS( "Dialog.GetButtonPressed" )]
Set Variable [ $r; Value: MBS("Dialog.SetButton"; 0; "Send All Copies to US") ]
Set Variable [ $r; Value: MBS("Dialog.SetButton"; 1; "Send All Copies to the Informant") ]
Set Variable [ $r; Value: MBS("Dialog.SetButton"; 2; "No Copies are required") ]
Set Variable [ $r; Value: MBS("Dialog.SetButton"; 3; "Reorder copies and send them to Informant”)]
Set Variable [ $r; Value: MBS("Dialog.SetButton"; 4; "Reorder copies and send them to US”)]
Set Variable [ $r; Value: MBS("Dialog.SetButton"; 5; "Reorder and send to US") ]
Set Variable [ $r; Value: MBS("Dialog.SetButton"; 6; "Town Hall Form Only”)]
Set Variable [ $r; Value: MBS("Dialog.SetButton"; 7; “Cancel”) ]
Set Variable [ $r; Value: MBS( "Dialog.SetMessage"; "Hello World" ) ]
Set Variable [ $r; Value: MBS( "Dialog.SetWindowTitle"; "test" ) ]
Set Variable [ $r; Value: MBS( "Dialog.Run" )]
Set Variable [ $button; Value: MBS( "Dialog.GetButtonPressed" )]
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.GetButtonPressed
- Dialog.GetSuppressionState
- Dialog.Reset
- Dialog.SetButton
- Dialog.SetDefaultButton
- Dialog.SetOtherButton
- Dialog.SetSheetEvaluate
- Dialog.SetSheetFileName
- Dialog.SetSheetScriptName
Release notes
- Version 9.2
- Changed Dialog.Run to return error if called on Server.
- Fixed problem with Dialog.Run if other button is empty text.
Example Databases
Blog Entries
- Goodies 33: Custom context menu commands for FileMaker ScriptWorkspace
- Dialogs with fields for Windows
- MBS FileMaker Advent calendar - Door 12 - Sending Mails
- MBS Plugin Advent calendar: 17 - Dialog
- Add a search and replace command for FileMaker Script Workspace
- MBS FileMaker Plugin, version 9.2pr3
- MBS FileMaker Plugin, version 9.2pr1
- MBS Filemaker Plugin, version 4.3pr9
This function checks for a license.
Created 18th August 2014, last changed 21st February 2026