QLPreviewPanel.AddContainer
---------------------------

Adds an container to the list of files to preview.

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

MBS( "QLPreviewPanel.AddContainer"; Container { ; Title } ) 

**MBS**( **"QLPreviewPanel.AddContainer";** /\* Adds an container to the list of files to preview. \*/  
**$Container**; /\* the container to show.e.g. MyTable::MyField \*/   
**$Title**) /\* Optional; The title for the container.e.g. "My Holiday" \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| Container | the container to show. | MyTable::MyField |  |
| Title | The title for the container. | "My Holiday" | Optional |

### Result

Returns OK or error.

### Description

Adds an container to the list of files to preview.  
If you have an existing file, better use [QLPreviewPanel.AddFile](QLPreviewPanelAddFile.md) function.  
The container can contain a file supported by QuickLook for previewing.  
  
Either we use file path from FileMaker's external container storage directly or we write a temporary file, which is cleared later when app quits or panel is cleared.  
### Examples

Show containers:

 # Prepare   
If \[ MBS ("[QLPreviewPanel.IsVisible](QLPreviewPanelIsVisible.md)") \]   
 Set Variable \[ $r ; Value: MBS ("[QLPreviewPanel.Hide](QLPreviewPanelHide.md)") \]   
End If  
Set Variable \[ $r ; Value: MBS ("[QLPreviewPanel.Clear](QLPreviewPanelClear.md)") \]   
\#   
\# Add all containers you have   
Set Variable \[ $r ; Value: MBS ("QLPreviewPanel.AddContainer"; PlaceHolder::Container ; "Stratocaster") \]   
\#   
\# Run it!   
Set Variable \[ $r ; Value: MBS ("[QLPreviewPanel.Show](QLPreviewPanelShow.md)") \]  
### See also

- [QLPreviewPanel.AddFile](QLPreviewPanelAddFile.md)
- [QLPreviewPanel.Clear](QLPreviewPanelClear.md)
- [QLPreviewPanel.Hide](QLPreviewPanelHide.md)
- [QLPreviewPanel.IsVisible](QLPreviewPanelIsVisible.md)
- [QLPreviewPanel.SetDismissTrigger](QLPreviewPanelSetDismissTrigger.md)
- [QLPreviewPanel.SetEditingAllowed](QLPreviewPanelSetEditingAllowed.md)
- [QLPreviewPanel.Show](QLPreviewPanelShow.md)

### Release notes

- **Version 8.4**
    - Added [QLPreviewPanel.AddContainer](http://www.mbsplugins.eu/QLPreviewPanelAddContainer.shtml), [QLPreviewPanel.CurrentPreviewItemIndex](http://www.mbsplugins.eu/QLPreviewPanelCurrentPreviewItemIndex.shtml), [QLPreviewPanel.CurrentPreviewItemPath](http://www.mbsplugins.eu/QLPreviewPanelCurrentPreviewItemPath.shtml), [QLPreviewPanel.CurrentPreviewItemTitle](http://www.mbsplugins.eu/QLPreviewPanelCurrentPreviewItemTitle.shtml) and [QLPreviewPanel.SetCurrentPreviewItemIndex](http://www.mbsplugins.eu/QLPreviewPanelSetCurrentPreviewItemIndex.shtml) functions.

### Example Databases

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

### Blog Entries

- [MBS FileMaker Plugin, version 8.4pr3](https://www.mbsplugins.de/archive/2018-08-16/MBS_FileMaker_Plugin_version_8/monkeybreadsoftware_blog_filemaker)
- [QLPreviewPanel functions for iOS](https://www.mbsplugins.de/archive/2018-08-15/QLPreviewPanel_functions_for_i/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 14th August 2018 , last changed 15th August 2018

  
[Python.ValueCount](PythonValueCount.md) - [QLPreviewPanel.AddFile](QLPreviewPanelAddFile.md)

[HTML Version](QLPreviewPanelAddContainer.shtml)