Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
Preferences.GetValue
Queries preferences value.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Preferences | 2.7 | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes, on macOS and Windows | ✅ Yes |
Parameters
Parameter | Description | Example |
---|---|---|
Domain | The domain name for your preferences. Leave empty for default one. | "de.mbsplugins.MyApp" |
Key | The key for the value lookup. | "Username" |
Result
Returns the text for the preference value.
Description
Queries preferences value.Domain should be an unique name for your app, like with reverse domain name notation. An example: "de.monkeybreadsoftware.filemaker.runtimes.MyApp". If you use no domain, the default one is used.
If no value exists for the value, an empty text is returned.
Values are read from registry on Windows and preference files on Mac.
Key must not be an empty string.
Examples
Gets preferences:
$username = MBS( "Preferences.GetValue"; "de.mbsplugins.MyApp"; "Username" )
Query file cache size:
MBS( "Preferences.GetValue"; "com.filemaker.client.advanced12"; "Preferences:FileCacheSize")
# Mac only!
Query name of user:
MBS( "Preferences.GetValue"; "com.filemaker.client.advanced12"; "Preferences:UserName")
# Mac only!
Query whether quick start window shows:
MBS( "Preferences.GetValue"; "com.filemaker.client.advanced12"; "Preferences:ShowQuickStart")
# Mac only!
Query network name:
MBS( "Preferences.GetValue"; "com.filemaker.client.advanced12"; "Preferences:NetworkName")
# Mac only!
Query memory cache size:
MBS( "Preferences.GetValue"; "com.filemaker.client.advanced12"; "Preferences:CacheSize")
# Mac only!
Query user name for FileMaker preferences:
MBS( "Preferences.GetValue"; "com.filemaker.client.advanced12"; "Preferences:UserName" )
Query advanced tools flag for FileMaker Pro Advanced 17 (mac):
MBS( "Preferences.GetValue"; ""; "Preferences:UseAdvancedTools" )
Check flag for whether system or custom user name is used:
e.g. for FileMaker Pro 17 on MacOS:
MBS("Math.BitwiseAND"; MBS( "Preferences.GetValue"; "com.filemaker.client.pro12"; "Preferences:AppGenOptions"); 8)
Value is 8 for custom name.
Value is 0 for system name.
Check whether flag "Notify me if updates are available" is on:
MBS("Math.BitwiseAND"; MBS( "Preferences.GetValue"; "com.filemaker.client.pro12"; "Preferences:AppGenOptions"); 32768)
# returns 0 if checkmark is set
Check whether flag "Notify me when a new version is available" is on:
MBS("Math.BitwiseAND"; MBS( "Preferences.GetValue"; "com.filemaker.client.pro12"; "Preferences:AppGenOptions"); 32)
# returns 0 if checkmark is set
Query Preferences:UseInitialfile setting in FileMaker 19:
MBS( "Preferences.GetValue"; "com.filemaker.client.pro12"; "Preferences:UseInitialfile")
See also
- Math.BitwiseAND
- Preferences.DeleteValue
- Preferences.GetValueType
- Preferences.HasValue
- Preferences.SetValue
Release notes
- Version 9.3
- Added Preferences.GetValueType function.
Example Databases
Blog Entries
This function checks for a license.
Created 18th August 2014, last changed 19th June 2020
Preferences.GetTextSelectionWithDragAndDrop - Preferences.GetValueType
