Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
FM.VariableSet
Stores a named variable that can be retrieved later using FM.VariableGet.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
FM Variables | 1.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "FM.VariableSet"; Name; Value ) More
Parameters
Parameter | Description | Example |
---|---|---|
Name | the name of the variable | |
Value | the value to assign to the variable |
Description
Stores a named variable that can be retrieved later using FM.VariableGet.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. All values are stored in their native data types (up to version 4.4 only text).
Use FM.VariableClear to clear the variables or FM.VariableClearAll to clear them all. FM.VariableList returns list of all defined variables.
On server, the variables are shared by all users connected to the server and stay between sessions. So e.g. on Web Direct all users have the same set of global variables via plugin. You can prefix variables with user ID/Name to make them per user unique. Variables stay in memory until released or process quits. If you like to share data between processes (Web Direct, Data API and Server Scripting), please use SharedMemory functions like SharedMemory.SetValue.
Examples
Set a variable
MBS( "FM.VariableSet" ; "myVar"; "Hello" )
See also
- FM.VariableAdd
- FM.VariableAppend
- FM.VariableClear
- FM.VariableClearAll
- FM.VariableGet
- FM.VariableList
- FM.VariableLookup
- FM.VariableNames
- FM.VariableReset
- SharedMemory.SetValue
Example Databases
- CURL/WebViewer Download Images with CURL
- Drag and Drop/for Mac/Image drag from one database to other/Image drag
- Drag and Drop/for Mac/Text drag from one database to other/Text drag
- SmartCard/Belgian EID Reader
- Third Party/FileMaker Snippet Storage
- Utility functions/Global Variables
- Window/Window Activation Trigger
Blog Entries
- Window Activation Trigger
- MBS FileMaker Plugin 12.3
- New functions of the MBS Plugin Version 9.5
- Data structures in FileMaker with MBS Plugins
- The power of global variables
FileMaker Magazin
This function checks for a license.
Created 18th August 2014, last changed 4th December 2023
