Component: Dictionary 
----------------------

Key/Value map to store values. An assoziative array preserving data types.

| Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|
| [5.0](newinversion50.md "First functions introduced with version 5.0.") / [14.3](newinversion143.md "Newest functions in version 14.3.") | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

  
| Item | Details |
|:--|:--|
| [CF](CF.md)   Shorter version for FM.CF. | All   14.1 |
| [Dictionary.AddDictionary](DictionaryAddDictionary.md)   Adds entries from other dictionary to current one. | All   11.1 |
| [Dictionary.AddSQL](DictionaryAddSQL.md)   Adds values to a dictionary via SQL. | All   5.1 |
| [Dictionary.AddSQLRecord](DictionaryAddSQLRecord.md)   Adds values from a record to dictionary via SQL. | All   7.4 |
| [Dictionary.AddSQLRecords](DictionaryAddSQLRecords.md)   Adds values from a record to dictionary via SQL. | All   7.4 |
| [Dictionary.Clear](DictionaryClear.md)   Clears the dictionary content. | All   5.0 |
| [Dictionary.Clone](DictionaryClone.md)   Creates a copy of the dictionary. | All   6.1 |
| [Dictionary.Count](DictionaryCount.md)   Returns number of keys in the dictionary. | All   5.0 |
| [Dictionary.Create](DictionaryCreate.md)   Creates a new dictionary. | All   5.0 |
| [Dictionary.CreateNamed](DictionaryCreateNamed.md)   Creates a new dictionary with desired key. | All   8.1 |
| [Dictionary.Deserialize](DictionaryDeserialize.md)   Restores a serialized dictionary. | All   5.2 |
| [Dictionary.FromJSON](DictionaryFromJSON.md)   Creates dictionary from JSON. | All   11.1 |
| [Dictionary.GetTag](DictionaryGetTag.md)   Queries the tag value. | All   14.3 |
| [Dictionary.HasKey](DictionaryHasKey.md)   Checks if the given key exists in dictionary. | All   5.0 |
| [Dictionary.HasKeys](DictionaryHasKeys.md)   Checks if the given keys exist in dictionary. | All   14.2 |
| [Dictionary.KeyAtIndex](DictionaryKeyAtIndex.md)   Returns key with given index. | All   5.0 |
| [Dictionary.Keys](DictionaryKeys.md)   Returns list with all keys. | All   5.0 |
| [Dictionary.KeysWithPostfix](DictionaryKeysWithPostfix.md)   Returns list with all keys matching postfix. | All   11.4 |
| [Dictionary.KeysWithPrefix](DictionaryKeysWithPrefix.md)   Returns list with all keys matching prefix. | All   11.4 |
| [Dictionary.List](DictionaryList.md)   Returns list of all dictionary IDs. | All   5.2 |
| [Dictionary.Lookup](DictionaryLookup.md)   Looks up value for the key. | All   12.1 |
| [Dictionary.Release](DictionaryRelease.md)   Releases dictionary and all memory used. | All   5.0 |
| [Dictionary.ReleaseAll](DictionaryReleaseAll.md)   Releases all dictionaries. | All   10.5 |
| [Dictionary.RemoveKey](DictionaryRemoveKey.md)   Removes value with given key. | All   5.0 |
| [Dictionary.Serialize](DictionarySerialize.md)   Serialized a dictionary as a text. | All   5.2 |
| [Dictionary.SetList](DictionarySetList.md)   Fills dictionary with keys and values form a list. | All   6.2 |
| [Dictionary.SetQuickList](DictionarySetQuickList.md)   Fills dictionary with keys and values form a quick list. | All   7.1 |
| [Dictionary.SetTag](DictionarySetTag.md)   Sets the tag value. | All   14.3 |
| [Dictionary.SetValueForKey](DictionarySetValueForKey.md)   Stores value for given key. | All   5.0 |
| [Dictionary.SetVariables](DictionarySetVariables.md)   Creates variables with given keys and values from dictionary. | All   5.1 |
| [Dictionary.ToJSON](DictionaryToJSON.md)   Returns JSON representation of dictionary for data exchange. | All   6.1 |
| [Dictionary.ToMatrix](DictionaryToMatrix.md)   Converts dictionary to a matrix. | All   13.2 |
| [Dictionary.ToText](DictionaryToText.md)   Returns text representation of dictionary for data exchange. | All   6.1 |
| [Dictionary.ToXML](DictionaryToXML.md)   Returns XML representation of dictionary for data exchange. | All   6.1 |
| [Dictionary.ValueForKey](DictionaryValueForKey.md)   Queries value for the key. | All   5.0 |
| [Dictionary.ValueTypeForKey](DictionaryValueTypeForKey.md)   Queries data type of the value for the key. | All   5.1 |
| [Dictionary.Values](DictionaryValues.md)   Returns list with all values as text. | All   5.1 |
| [FM.CF](FMCF.md)   Calls a custom function given the name with FileMaker values. | All   11.3 |

38 functions shown.

These functions require a license (87%).

### Release notes

- **Version 14.3**
    - Added [Dictionary.GetTag](https://www.mbsplugins.eu/DictionaryGetTag.shtml) and [Dictionary.SetTag](https://www.mbsplugins.eu/DictionarySetTag.shtml) functions.
- **Version 14.2**
    - Added [QuickList.HasValues](https://www.mbsplugins.eu/QuickListHasValues.shtml) and [Dictionary.HasKeys](https://www.mbsplugins.eu/DictionaryHasKeys.shtml) functions.
- **Version 13.2**
    - Added [Dictionary.ToMatrix](https://www.mbsplugins.eu/DictionaryToMatrix.shtml) function.
    - Added root name parameter to [Dictionary.ToXML](https://www.mbsplugins.eu/DictionaryToXML.shtml) function.
    - Fixed a possible memory leak in [Dictionary.AddSQL](https://www.mbsplugins.eu/DictionaryAddSQL.shtml) function.
- **Version 12.1**
    - Added [Dictionary.Lookup](https://www.mbsplugins.eu/DictionaryLookup.shtml) function.
- **Version 12.0**
    - Fixed [JSON](https://www.mbsplugins.eu/component_JSON.shtml) functions to return NULL for numbers with no content, e.g. empty text. This affects [JSON.CreateNumber](https://www.mbsplugins.eu/JSONCreateNumber.shtml), [Dictionary.ToJSON](https://www.mbsplugins.eu/DictionaryToJSON.shtml), [FM.SQL.JSONColumn](https://www.mbsplugins.eu/FMSQLJSONColumn.shtml), [FM.SQL.JSONRecord](https://www.mbsplugins.eu/FMSQLJSONRecord.shtml) and [FM.SQL.JSONRecords](https://www.mbsplugins.eu/FMSQLJSONRecords.shtml) functions.
- **Version 11.4**
    - Added [Dictionary.KeysWithPostfix](https://www.mbsplugins.eu/DictionaryKeysWithPostfix.shtml) and [Dictionary.KeysWithPrefix](https://www.mbsplugins.eu/DictionaryKeysWithPrefix.shtml) functions.
    - Improved [Dictionary.SetVariables](https://www.mbsplugins.eu/DictionarySetVariables.shtml) to not allow invalid variable names.
- **Version 11.3**
    - Added [FM.CF](https://www.mbsplugins.eu/FMCF.shtml) function to run custom functions defined in a database table and managed via [Dictionary](https://www.mbsplugins.eu/component_Dictionary.shtml) functions.
- **Version 11.1**
    - Added [Dictionary.AddDictionary](https://www.mbsplugins.eu/DictionaryAddDictionary.shtml) and [Dictionary.FromJSON](https://www.mbsplugins.eu/DictionaryFromJSON.shtml) functions.
- **Version 11.0**
    - Fixed issue with [FM.SQL.JSONRecord](https://www.mbsplugins.eu/FMSQLJSONRecord.shtml), [FM.SQL.JSONRecords](https://www.mbsplugins.eu/FMSQLJSONRecords.shtml) and [Dictionary.ToJSON](https://www.mbsplugins.eu/DictionaryToJSON.shtml) where long numbers where truncated to double precision.

### Blog Entries

- [New in MBS FileMaker Plugin 12.1](https://www.mbsplugins.de/archive/2022-03-22/New_in_MBS_FileMaker_Plugin_12/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 11.3pr3](https://www.mbsplugins.de/archive/2021-06-14/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [Neues MBS FileMaker Plugin 11.1](https://www.mbsplugins.de/archive/2021-03-09/Neues_MBS_FileMaker_Plugin_111/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin 11.1](https://www.mbsplugins.de/archive/2021-03-09/MBS_FileMaker_Plugin_111/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin v8.1 with 5100 Functions In One Plugin](https://www.mbsplugins.de/archive/2018-03-06/MBS_FileMaker_Plugin_v81_with_/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin 8.1](https://www.mbsplugins.de/archive/2018-03-06/MBS_FileMaker_Plugin_81/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)
- [MBS FileMaker Plug-in 6.1 for OS X/Windows](https://www.mbsplugins.de/archive/2016-03-08/MBS_FileMaker_Plug-in_61_for_O/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin 5.1 for OS X/Windows](https://www.mbsplugins.de/archive/2015-05-19/MBS_FileMaker_Plugin_51_for_OS/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 3/2025, Seite 22](https://filemaker-magazin.de/neuigkeit/4290-Appetithappen-FMM_202503)
- [Ausgabe 6/2020, Seite 25](https://filemaker-magazin.de/neuigkeit/4118-Appetithappen-FMM_202006)

### Example Databases

- [Dictionary/Dictionary Container Test](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Dictionary/Dictionary%20Container%20Test.shtml#2ScriptAnchor_)
- [Dictionary/Pass Parameters with Dictionary](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Dictionary/Pass%20Parameters%20with%20Dictionary.shtml#1Button47.0000000315.000000073.0000000498.0000000LayoutObjectAnchor_)
- [Utility functions/FileMaker Custom Functions via Dictionary](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Utility%20functions/FileMaker%20Custom%20Functions%20via%20Dictionary.shtml#2ScriptAnchor_)

[HTML Version](component_Dictionary.shtml)