QLPreviewPanel.SetDismissTrigger
--------------------------------

Sets the script trigger.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [QuickLook](component_QuickLook.md) | [11.1](newinversion111.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |

MBS( "QLPreviewPanel.SetDismissTrigger"; FileName; ScriptName { ; Parameter } ) 

**MBS**( **"QLPreviewPanel.SetDismissTrigger";** /\* Sets the script trigger. \*/  
**$FileName**; /\* The name of the FileMaker File that contains the script.e.g. "test.fmp12" \*/   
**$ScriptName**; /\* The name of the script to run.e.g. "MyScript" \*/   
**$Parameter**) /\* Optional; The parameter to pass to the script. \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| FileName | The name of the FileMaker File that contains the script. | "test.fmp12" |  |
| ScriptName | The name of the script to run. | "MyScript" |  |
| Parameter | The parameter to pass to the script. |  | Optional      Added in version **16.2**. |

### Result

Returns OK or error.

### Description

Sets the script trigger.  
This script is called when a panel is dismissed.  
  
Added macOS support in plugin version 16.2.  
### Examples

Setup trigger:

 Set Variable \[ $r ; Value: MBS ( "QLPreviewPanel.SetDismissTrigger"; Get(FileName); "Dismissed") \]   
Set Variable \[ $r ; Value: MBS ( "[QLPreviewPanel.Show](QLPreviewPanelShow.md)") \]   
If \[ MBS ("IsError") \]   
 Show Custom Dialog \[ "Failed to show panel" ; $r \]   
End If  
Show panel to edit PDF document in container:

 Set Variable \[ $r ; Value: MBS ( "[QLPreviewPanel.Clear](QLPreviewPanelClear.md)" ) \]   
Set Variable \[ $r ; Value: MBS ( "[QLPreviewPanel.AddContainer](QLPreviewPanelAddContainer.md)"; MyTable::PDFContainer ) \]   
Set Variable \[ $r ; Value: MBS ( "QLPreviewPanel.SetDismissTrigger"; Get(FileName); "Dismissed" ) \]   
Set Variable \[ $r ; Value: MBS ( "[QLPreviewPanel.SetEditingAllowed](QLPreviewPanelSetEditingAllowed.md)"; 2) \]   
Set Variable \[ $r ; Value: MBS ( "[QLPreviewPanel.Show](QLPreviewPanelShow.md)" ) \]  
### See also

- [IsError](IsError.md)
- [QLPreviewPanel.AddContainer](QLPreviewPanelAddContainer.md)
- [QLPreviewPanel.Clear](QLPreviewPanelClear.md)
- [QLPreviewPanel.SetEditingAllowed](QLPreviewPanelSetEditingAllowed.md)
- [QLPreviewPanel.Show](QLPreviewPanelShow.md)

### Release notes

- **Version 16.2**
    - Added [QLPreviewPanel.SetDismissTrigger](https://www.mbsplugins.eu/QLPreviewPanelSetDismissTrigger.shtml) function for macOS.
- **Version 11.1**
    - Added [QLPreviewPanel.GetEditingAllowed](https://www.mbsplugins.eu/QLPreviewPanelGetEditingAllowed.shtml), [QLPreviewPanel.SavedFiles](https://www.mbsplugins.eu/QLPreviewPanelSavedFiles.shtml), [QLPreviewPanel.SetDismissTrigger](https://www.mbsplugins.eu/QLPreviewPanelSetDismissTrigger.shtml) and [QLPreviewPanel.SetEditingAllowed](https://www.mbsplugins.eu/QLPreviewPanelSetEditingAllowed.shtml) functions to use markup editing of documents on iOS.

### Example Databases

- [iOS/Examples/Markup](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/iOS/Examples/Markup.shtml#1ScriptAnchor_)

### Blog Entries

- [MBS FileMaker Plugin, version 16.2pr5](https://www.mbsplugins.de/archive/2026-05-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin 11.1](https://www.mbsplugins.de/archive/2021-03-16/MBS_FileMaker_Plugin_111/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 11.1pr5](https://www.mbsplugins.de/archive/2021-02-20/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [Markup for FileMaker on iOS](https://www.mbsplugins.de/archive/2021-02-19/Markup_for_FileMaker_on_iOS/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th February 2021 , last changed 29th April 2026

  
[QLPreviewPanel.SetCurrentPreviewItemIndex](QLPreviewPanelSetCurrentPreviewItemIndex.md) - [QLPreviewPanel.SetEditingAllowed](QLPreviewPanelSetEditingAllowed.md)

[HTML Version](QLPreviewPanelSetDismissTrigger.shtml)