Clipboard.SetFileMakerData
--------------------------

Puts the xml text on the clipboard for a FileMaker layout/script object.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Clipboard](component_Clipboard.md) | [4.0](newinversion40.md) | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |

MBS( "Clipboard.SetFileMakerData"; Type; Text ) 

**MBS**( **"Clipboard.SetFileMakerData";** /\* Puts the xml text on the clipboard for a FileMaker layout/script object. \*/  
**$Type**; /\* What element type to set.   
Can be "auto" for version 10.1 for automatic type selection.e.g. "Layout" \*/   
**$Text**) /\* The text to put on the clipboard. \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Type | What element type to set.    Can be "auto" for version 10.1 for automatic type selection. | "Layout" |
| Text | The text to put on the clipboard. | $text |

### Result

Returns OK or error.

### Description

Puts the xml text on the clipboard for a FileMaker layout/script object.  
Be sure to put the correct xml on the clipboard to avoid FileMaker being confused.  
The type can be ValueList, Script, ScriptStep, Layout, CustomFunction, Table, Field or Layout12.  
Pass auto as type in version 10.1 or newer to let the plugin look at the xml to decide on type.  
  
For server this will modify the clipboard of the user account running the server app on the server computer and not the clipboard of any client.  
  
Added type ValueList for FileMaker 16.  
For custom menus in FileMaker 17, please use [Clipboard.SetText](ClipboardSetText.md) function.  
### Examples

Put xml back on clipboard:

 Set Variable \[$r ; Value: MBS ( "Clipboard.SetFileMakerData"; "auto"; $xml ) \]  
### See also

- [Clipboard.AddText](ClipboardAddText.md)
- [Clipboard.GetFileMakerData](ClipboardGetFileMakerData.md)
- [Clipboard.SetText](ClipboardSetText.md)
- [HotKey.Register](HotKeyRegister.md)
- [SyntaxColoring.AddContextMenuCommand](SyntaxColoringAddContextMenuCommand.md)

### Release notes

- **Version 14.4**
    - Fixed a memory leak in [Clipboard.SetFileMakerData](https://www.mbsplugins.eu/ClipboardSetFileMakerData.shtml), [Clipboard.DetectFileMakerDataType](https://www.mbsplugins.eu/ClipboardDetectFileMakerDataType.shtml) and [XML.Import](https://www.mbsplugins.eu/XMLImport.shtml) functions.
- **Version 12.0**
    - Enhanced [Clipboard.DetectFileMakerDataType](https://www.mbsplugins.eu/ClipboardDetectFileMakerDataType.shtml) and [Clipboard.SetFileMakerData](https://www.mbsplugins.eu/ClipboardSetFileMakerData.shtml) to recognize script folders.
- **Version 11.5**
    - Fixed crash in [Clipboard.SetFileMakerData](https://www.mbsplugins.eu/ClipboardSetFileMakerData.shtml) function.
- **Version 10.1**
    - Added auto mode for [Clipboard.SetFileMakerData](https://www.mbsplugins.eu/ClipboardSetFileMakerData.shtml) and [Clipboard.GetFileMakerData](https://www.mbsplugins.eu/ClipboardGetFileMakerData.shtml) functions.
- **Version 7.2**
    - Added ValueList type for [Clipboard.SetFileMakerData](http://www.mbsplugins.eu/ClipboardSetFileMakerData.shtml) and [Clipboard.GetFileMakerData](http://www.mbsplugins.eu/ClipboardGetFileMakerData.shtml).

### Example Databases

- [Third Party/FileMaker Snippet Storage](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Third%20Party/FileMaker%20Snippet%20Storage.shtml#2ScriptAnchor_)
- [Utility functions/Create Sort Script](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Utility%20functions/Create%20Sort%20Script.shtml#3ScriptAnchor_)
- [Win Only/Snippets for Windows](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Win%20Only/Snippets%20for%20Windows.shtml#3ScriptAnchor_)

### Blog Entries

- [Goodies 33: Custom context menu commands for FileMaker ScriptWorkspace](https://www.monkeybreadsoftware.com/filemaker/SyntaxColoring/33-CustomcontextmenucommandsforFileMakerScriptWorkspace.shtml)
- [MBS FileMaker Plugin, version 14.4pr1](https://www.mbsplugins.de/archive/2024-07-24/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 12.0pr6](https://www.mbsplugins.de/archive/2022-01-06/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 11.5pr1](https://www.mbsplugins.de/archive/2021-10-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 10.1pr5](https://www.mbsplugins.de/archive/2020-02-24/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [Generate sort script automatically](https://www.mbsplugins.de/archive/2019-12-16/Generate_sort_script_automatic/monkeybreadsoftware_blog_filemaker)
- [New functions of the MBS Plugin Version 9.5](https://www.mbsplugins.de/archive/2019-11-21/New_functions_of_the_MBS_Plugi/monkeybreadsoftware_blog_filemaker)
- [Insert snippet for FileMaker on Windows](https://www.mbsplugins.de/archive/2019-11-20/Insert_snippet_for_FileMaker_o/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)
- [Custom context menu commands for FileMaker ScriptWorkspace](https://www.mbsplugins.de/archive/2019-10-19/Custom_context_menu_commands_f/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 6/2020, Seite 28 bis 29](https://filemaker-magazin.de/neuigkeit/4118-Appetithappen-FMM_202006)

This function checks for a license.

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

  
[Clipboard.GetTypes](ClipboardGetTypes.md) - [Clipboard.SetFiles](ClipboardSetFiles.md)

[HTML Version](ClipboardSetFileMakerData.shtml)