Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 7.0   7.1   7.2   7.3   7.4   7.5   8.0   8.1   8.2   8.3    Statistic  


Sets preferences value.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
Preferences 2.7 Yes Yes Yes Yes Yes

MBS( "Preferences.SetValue"; Domain; Key { ; Value; Type } )


Parameter Description Example value
Domain The domain name for your preferences. Leave empty for default one. "de.mbsplugins.MyApp"
Key The key for the value lookup. "Username"
Value Optional
The new value text.
Type Optional
The data type to use. (Mac only)
Can be integer, double, boolean or text.


Returns OK or error message.


Sets 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.
Values are stored in registry on Windows and preference files on Mac.
Key must not be an empty string.

This is the location where you can store global settings like the last used username for login.
Changing preferences of FileMaker only works, if you restart FileMaker for changes take effect. Going to the preferences dialog (even with cancel on exit), can cause FileMaker to write it's settings over what you just changed.


Sets preferences:

MBS( "Preferences.SetValue"; "de.mbsplugins.MyApp"; "Username"; $username )

Set flag to not allow plugins to update:

MBS( "Preferences.SetValue"; "com.filemaker.client.advanced12"; "Preferences:AllowToUpdatePlugins"; 0; "integer")

Set file cache to 1 GB:

MBS( "Preferences.SetValue"; "com.filemaker.client.advanced12"; "Preferences:FileCacheSize"; 1048576; "integer")

Set user name in FileMaker preferences:

MBS( "Preferences.SetValue"; "com.filemaker.client.advanced12"; "Preferences:UserName"; "Chris" )

See also

Example Databases

Preferences.SetTextSelectionWithDragAndDrop   -   PrintDialog.ClearOption

Feedback: Report problem or ask question.

MBS FileMaker blog