Plugin.LimitToFile
------------------

Sets which files are allowed to use our plugin.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Plugin](component_Plugin.md) | [15.1](newinversion151.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "Plugin.LimitToFile"; FileList ) 

**MBS**( **"Plugin.LimitToFile";** /\* Sets which files are allowed to use our plugin. \*/  
**$FileList**) /\* The list of file names to allow.  
We use Get(FileName) and compare case sensitive, so please match the names exactly.e.g. "Contact" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| FileList | The list of file names to allow.   We use Get(FileName) and compare case sensitive, so please match the names exactly. | "Contact" |

### Result

Returns OK or error.

### Description

Sets which files are allowed to use our plugin.  
This limitation is enforced early, so you can't even query the plugin version anymore if not allowed.  
  
Please use [Plugin.SetFunctions](PluginSetFunctions.md) later to disallow calling this function to avoid someone changing the allowed file list.  
The setting is not permanent, so please do this in start script of the solution.  
### Examples

Limit to current file only:

 Set Variable \[ $r ; Value: MBS ( "Plugin.LimitToFile"; Get(FileName) ) \]  
Limit to a few files in a solution:

 Set Variable \[ $r ; Value: MBS ( "Plugin.LimitToFile"; "MyInvoices¶MyContacts¶MyAssets") \]  
Allow all files:

 Set Variable \[ $r ; Value: MBS ( "Plugin.LimitToFile"; "" ) \]  
### See also

- [Plugin.SetFunctions](PluginSetFunctions.md)

### Release notes

- **Version 15.1**
    - Added [Plugin.LimitToFile](https://www.mbsplugins.eu/PluginLimitToFile.shtml) function.

### Blog Entries

- [MBS FileMaker Plugin 15.1 News](https://www.mbsplugins.de/archive/2025-03-19/MBS_FileMaker_Plugin_151_News/monkeybreadsoftware_blog_filemaker)
- [Exploring the Plugin.LimitToFile Feature in the MBS FileMaker Plugin 15.1](https://www.mbsplugins.de/archive/2025-03-12/Exploring_the_PluginLimitToFil/monkeybreadsoftware_blog_filemaker)
- [Neues MBS FileMaker Plugin 15.1 für Claris FileMaker](https://www.mbsplugins.de/archive/2025-03-11/Neues_MBS_FileMaker_Plugin_151/monkeybreadsoftware_blog_filemaker)
- [MBS Plugin 15.1 for Claris FileMaker](https://www.mbsplugins.de/archive/2025-03-11/MBS_Plugin_151_for_Claris_File/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 15.1pr1](https://www.mbsplugins.de/archive/2025-02-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 28th January 2025 , last changed 28th January 2025

  
[Plugin.LimitFunction](PluginLimitFunction.md) - [Plugin.LoadIconvLibrary](PluginLoadIconvLibrary.md)

[HTML Version](PluginLimitToFile.shtml)