SharedMemory.GetValue
---------------------

Queries shared memory value.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [SharedMemory](component_SharedMemory.md) | [10.1](newinversion101.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No |

MBS( "SharedMemory.GetValue"; Name ) 

**MBS**( **"SharedMemory.GetValue";** /\* Queries shared memory value. \*/  
**$Name**) /\* The name of the shared memory object.e.g. "test" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Name | The name of the shared memory object. | "test" |

### Result

Returns text value or error.

### Description

Queries shared memory value.  
MBS Plugin provides [SharedMemory](component_SharedMemory.md) functions to store UTF-8 text in shared memory, so one process can set it and other can read it, e.g. two versions of FileMaker Pro or two server processes.  
  
This function returns an error if variable doesn't exist. [SharedMemory.LookupValue](SharedMemoryLookupValue.md) can query value (or default value).  
### Examples

Query shared memory object:

 MBS ( "SharedMemory.GetValue"; "test")  
### See also

- [SharedMemory.DeleteValue](SharedMemoryDeleteValue.md)
- [SharedMemory.LookupValue](SharedMemoryLookupValue.md)
- [SharedMemory.SetValue](SharedMemorySetValue.md)

### Release notes

- **Version 14.5**
    - Fixed [SharedMemory.GetValue](https://www.mbsplugins.eu/SharedMemoryGetValue.shtml) and [SharedMemory.SetValue](https://www.mbsplugins.eu/SharedMemorySetValue.shtml) functions to work with empty values.
- **Version 12.2**
    - Changed [SharedMemory.GetValue](https://www.mbsplugins.eu/SharedMemoryGetValue.shtml) to trim trailing zero bytes.

### Blog Entries

- [MBS FileMaker Plugin, version 14.5pr4](https://www.mbsplugins.de/archive/2024-10-25/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 12.2pr6](https://www.mbsplugins.de/archive/2022-05-10/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [New in the MBS FileMaker Plugin 10.1](https://www.mbsplugins.de/archive/2020-03-17/New_in_the_MBS_FileMaker_Plugi/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 2nd February 2020 , last changed 29th January 2023

  
[SharedMemory.Exists](SharedMemoryExists.md) - [SharedMemory.LookupValue](SharedMemoryLookupValue.md)

[HTML Version](SharedMemoryGetValue.shtml)