Dialog.RunSheet
---------------

Runs dialog as sheet.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Dialog](component_Dialog.md) | [4.2](newinversion42.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ❌ No |

MBS( "Dialog.RunSheet"; WindowRef ) 

**MBS**( **"Dialog.RunSheet";** /\* Runs dialog as sheet. \*/  
**$WindowRef**) /\* Window Reference is the unique OS level window ID. You can obtain this by using the [Window.FindByTitle](WindowFindByTitle.md) or [Window.FindByIndex](WindowFindByIndex.md) functions. Pass zero to access the frontmost window.e.g. 0 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| WindowRef | Window Reference is the unique OS level window ID. You can obtain this by using the [Window.FindByTitle](WindowFindByTitle.md) or [Window.FindByIndex](WindowFindByIndex.md) functions. Pass zero to access the frontmost window. | 0 |

### Result

Returns Ok or error.

### Description

Runs dialog as sheet.  
Please pass reference to a window to use as parent window.  
  
The script will be triggered later and you can query the button clicked with [Dialog.GetButtonPressed](DialogGetButtonPressed.md) or [Dialog.GetLastResult](DialogGetLastResult.md). The button clicked is also passed as parameter to the script. Use [Dialog.SetSheetFileName](DialogSetSheetFileName.md) and [Dialog.SetSheetScriptName](DialogSetSheetScriptName.md) to define which script to run.  
### See also

- [Dialog.GetButton](DialogGetButton.md)
- [Dialog.GetButtonPressed](DialogGetButtonPressed.md)
- [Dialog.GetLastResult](DialogGetLastResult.md)
- [Dialog.SetSheetEvaluate](DialogSetSheetEvaluate.md)
- [Dialog.SetSheetFileName](DialogSetSheetFileName.md)
- [Dialog.SetSheetScriptName](DialogSetSheetScriptName.md)
- [Window.FindByIndex](WindowFindByIndex.md)
- [Window.FindByTitle](WindowFindByTitle.md)

### Example Databases

- [Window/Dialog](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Window/Dialog.shtml#2ScriptAnchor_)

This function checks for a license.

Created 18th August 2014 , last changed 25th November 2019

  
[Dialog.Run](DialogRun.md) - [Dialog.SetAlternateButton](DialogSetAlternateButton.md)

[HTML Version](DialogRunSheet.shtml)