Variable.Clear
--------------

Destroys a variable that was declared with [Variable.Set](VariableSet.md).

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Variable](component_Variable.md) | [1.2](newinversion12.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "Variable.Clear"; Name ) 

**MBS**( **"Variable.Clear";** /\* Destroys a variable that was declared with Variable.Set. \*/  
**$Name**) /\* The name of the variable to destroy. \*/ 

(old name: FM.VariableClear)

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Name | The name of the variable to destroy. |  |

### Result

Returns OK.

### Description

Destroys a variable that was declared with [Variable.Set](VariableSet.md).  
### Examples

Destroy a variable

 MBS ( "Variable.Clear" ; "MyVar" )  
### See also

- [Variable.Add](VariableAdd.md)
- [Variable.AppendValue](VariableAppendValue.md)
- [Variable.ClearAll](VariableClearAll.md)
- [Variable.Names](VariableNames.md)
- [Variable.Reset](VariableReset.md)
- [Variable.Set](VariableSet.md)

### Example Databases

- [SmartCard/Belgian EID Reader](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/SmartCard/Belgian%20EID%20Reader.shtml#4ScriptAnchor_)
- [Third Party/FileMaker Snippet Storage](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Third%20Party/FileMaker%20Snippet%20Storage.shtml#57CustomFunctionAnchor_)
- [Utility functions/Global Variables](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Utility%20functions/Global%20Variables.shtml#2ScriptAnchor_)
- [Window/Window Activation Trigger](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Window/Window%20Activation%20Trigger.shtml#1ScriptAnchor_)

### Blog Entries

- [Window Activation Trigger](https://www.mbsplugins.de/archive/2022-10-23/Window_Activation_Trigger/monkeybreadsoftware_blog_filemaker)
- [The power of global variables](https://www.mbsplugins.de/archive/2016-06-09/The_power_of_global_variables/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 2/2014, Seite 31](https://filemaker-magazin.de/neuigkeit/3731-Appetithappen-FMM_201402)

This function checks for a license.

Created 18th August 2014 , last changed 16th April 2025

  
[Variable.AppendValue](VariableAppendValue.md) - [Variable.ClearAll](VariableClearAll.md)

[HTML Version](VariableClear.shtml)