Dialog.Run
----------

Runs the dialog.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Dialog](component_Dialog.md) | [4.1](newinversion41.md) | ✅ 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](DialogReset.md)") \]  
Set Variable \[ $r ; Value: MBS ("[Dialog.SetButton](DialogSetButton.md)"; 0; "Send All Copies to US") \]  
Set Variable \[ $r ; Value: MBS ("[Dialog.SetButton](DialogSetButton.md)"; 1; "Send All Copies to the Informant") \]  
Set Variable \[ $r ; Value: MBS ("[Dialog.SetButton](DialogSetButton.md)"; 2; "No Copies are required") \]  
Set Variable \[ $r ; Value: MBS ("[Dialog.SetButton](DialogSetButton.md)"; 3; "Reorder copies and send them to Informant”)\]  
Set Variable \[ $r ; Value: MBS ("[Dialog.SetButton](DialogSetButton.md)"; 4; "Reorder copies and send them to US”)\]  
Set Variable \[ $r ; Value: MBS ("[Dialog.SetButton](DialogSetButton.md)"; 5; "Reorder and send to US") \]   
Set Variable \[ $r ; Value: MBS ("[Dialog.SetButton](DialogSetButton.md)"; 6; "Town Hall Form Only”)\]  
Set Variable \[ $r ; Value: MBS ("[Dialog.SetButton](DialogSetButton.md)"; 7; “Cancel”) \]  
Set Variable \[ $r ; Value: MBS ( "[Dialog.SetMessage](DialogSetMessage.md)"; "Hello World" ) \]  
Set Variable \[ $r ; Value: MBS ( "[Dialog.SetWindowTitle](DialogSetWindowTitle.md)"; "test" ) \]  
Set Variable \[ $r ; Value: MBS ( "Dialog.Run" )\]  
Set Variable \[ $button ; Value: MBS ( "[Dialog.GetButtonPressed](DialogGetButtonPressed.md)" )\]  
Run dialog with one Let statement:

 Let (   
\[  
 \_ = MBS ("[Dialog.Reset](DialogReset.md)") ;  
 \_ = MBS ("[Dialog.SetDefaultButton](DialogSetDefaultButton.md)" ; "Yes") ;  
 \_ = MBS ("[Dialog.SetOtherButton](DialogSetOtherButton.md)" ; "No") ;  
 \_ = MBS ("[Dialog.SetAlternateButton](DialogSetAlternateButton.md)" ; "Cancel") ;  
 \_ = MBS ("[Dialog.SetMessage](DialogSetMessage.md)" ; "Delete the old file?") ;  
 \_ = MBS ("[Dialog.SetWindowTitle](DialogSetWindowTitle.md)" ; "Backups done") ;  
 \_ = MBS ("Dialog.Run") ;  
 button = MBS ("[Dialog.GetButtonPressed](DialogGetButtonPressed.md)")  
\] ;  
 // 0 -&gt; Yes, 1 -&gt; No, 2 -&gt; Cancel  
 button  
)  
### See also

- [Dialog.GetButton](DialogGetButton.md)
- [Dialog.GetButtonPressed](DialogGetButtonPressed.md)
- [Dialog.GetSuppressionState](DialogGetSuppressionState.md)
- [Dialog.Reset](DialogReset.md)
- [Dialog.SetButton](DialogSetButton.md)
- [Dialog.SetDefaultButton](DialogSetDefaultButton.md)
- [Dialog.SetOtherButton](DialogSetOtherButton.md)
- [Dialog.SetSheetEvaluate](DialogSetSheetEvaluate.md)
- [Dialog.SetSheetFileName](DialogSetSheetFileName.md)
- [Dialog.SetSheetScriptName](DialogSetSheetScriptName.md)

### Release notes

- **Version 9.2**
    - Changed [Dialog.Run](http://www.mbsplugins.eu/DialogRun.shtml) to return error if called on Server.
    - Fixed problem with [Dialog.Run](http://www.mbsplugins.eu/DialogRun.shtml) if other button is empty text.

### Example Databases

- [SmartCard/Belgian EID Reader](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/SmartCard/Belgian%20EID%20Reader.shtml#3ScriptAnchor_)
- [Utility functions/Idle](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Utility%20functions/Idle.shtml#3ScriptAnchor_)
- [Window/Dialog](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Window/Dialog.shtml#1ScriptAnchor_)

### Blog Entries

- [Goodies 33: Custom context menu commands for FileMaker ScriptWorkspace](https://www.monkeybreadsoftware.com/filemaker/SyntaxColoring/33-CustomcontextmenucommandsforFileMakerScriptWorkspace.shtml)
- [Dialogs with fields for Windows](https://www.mbsplugins.de/archive/2026-02-25/Dialogs_with_fields_for_Window/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Advent calendar - Door 12 - Sending Mails](https://www.mbsplugins.de/archive/2024-12-12/MBS_FileMaker_Advent_calendar_/monkeybreadsoftware_blog_filemaker)
- [MBS Plugin Advent calendar: 17 - Dialog](https://www.mbsplugins.de/archive/2023-12-17/MBS_Plugin_Advent_calendar_17_/monkeybreadsoftware_blog_filemaker)
- [Add a search and replace command for FileMaker Script Workspace](https://www.mbsplugins.de/archive/2019-11-14/Add_a_search_and_replace_comma/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 9.2pr3](https://www.mbsplugins.de/archive/2019-04-17/MBS_FileMaker_Plugin_version_9/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 9.2pr1](https://www.mbsplugins.de/archive/2019-04-02/MBS_FileMaker_Plugin_version_9/monkeybreadsoftware_blog_filemaker)
- [MBS Filemaker Plugin, version 4.3pr9](https://www.mbsplugins.de/archive/2014-09-05/MBS_Filemaker_Plugin_version_4/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th August 2014 , last changed 21st February 2026

  
[Dialog.Reset](DialogReset.md) - [Dialog.RunSheet](DialogRunSheet.md)

[HTML Version](DialogRun.shtml)