Variable.Get
------------

Retrieves the value of named variable that was declared using [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.Get"; Name ) 

**MBS**( **"Variable.Get";** /\* Retrieves the value of named variable that was declared using Variable.Set. \*/  
**$Name**) /\* The Name of the variable \*/ 

(old name: FM.VariableGet)

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Name | The Name of the variable |  |

### Description

Retrieves the value of named variable that was declared using [Variable.Set](VariableSet.md).  
Unlike the variables that were introduced in FileMaker 8 these variables are not limited to the File or Script. In other words they can be retrieved from any file in the system regardless of where they were declared.  
  
You can check with [Variable.Exists](VariableExists.md) whether a variable exists.  
Returns an error if variable doesn't exist. Use [Variable.Lookup](VariableLookup.md) to lookup without getting an error if the variable doesn't exist.  
### Examples

Retrieve a variable

 MBS ( "Variable.Get" ; "myVar" )  
### See also

- [Variable.Add](VariableAdd.md)
- [Variable.Append](VariableAppend.md)
- [Variable.AppendValue](VariableAppendValue.md)
- [Variable.Exists](VariableExists.md)
- [Variable.List](VariableList.md)
- [Variable.Lookup](VariableLookup.md)
- [Variable.Reset](VariableReset.md)
- [Variable.Set](VariableSet.md)

### Example Databases

- [CURL/WebViewer Download Images with CURL](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/CURL/WebViewer%20Download%20Images%20with%20CURL.shtml#1ScriptAnchor_)
- [Drag and Drop/for Mac/Image drag from one database to other/Image drop](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Drag%20and%20Drop/for%20Mac/Image%20drag%20from%20one%20database%20to%20other/Image%20drop.shtml#3ScriptAnchor_)
- [Drag and Drop/for Mac/Text drag from one database to other/Text drop](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Drag%20and%20Drop/for%20Mac/Text%20drag%20from%20one%20database%20to%20other/Text%20drop.shtml#3ScriptAnchor_)
- [SmartCard/Belgian EID Reader](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/SmartCard/Belgian%20EID%20Reader.shtml#3ScriptAnchor_)
- [Third Party/FileMaker Snippet Storage](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Third%20Party/FileMaker%20Snippet%20Storage.shtml#58CustomFunctionAnchor_)
- [Utility functions/Global Variables](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Utility%20functions/Global%20Variables.shtml#1294FieldAnchor_)
- [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)
- [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)
- [Data structures in FileMaker with MBS Plugins](https://www.mbsplugins.de/archive/2017-10-19/Data_structures_in_FileMaker_w/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 6/2019, Seite 33 bis 34](https://filemaker-magazin.de/neuigkeit/4064-Appetithappen-FMM_201906)
- [Ausgabe 2/2014, Seite 31 bis 32](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.Exists](VariableExists.md) - [Variable.List](VariableList.md)

[HTML Version](VariableGet.shtml)