Preferences.DeleteValue
-----------------------

Deletes a preference value.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Preferences](component_Preferences.md) | [6.0](newinversion60.md) | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes, on macOS and Windows | ✅ Yes |

MBS( "Preferences.DeleteValue"; Domain; Key ) 

**MBS**( **"Preferences.DeleteValue";** /\* Deletes a preference value. \*/  
**$Domain**; /\* The domain name for your preferences. Leave empty for default one.e.g. "de.mbsplugins.MyApp" \*/   
**$Key**) /\* The key for the value lookup.e.g. "Username" \*/ 

### 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 OK or error.

### Description

Deletes a preference value.  
### Examples

Delete username value

 MBS ( "Preferences.DeleteValue"; "de.mbsplugins.MyApp"; "Username" )  
Delete Initial file path:

 MBS ( "Preferences.DeleteValue"; "com.filemaker.client.pro12"; "Preferences:Initialfile")  
### See also

- [Preferences.GetValue](PreferencesGetValue.md)
- [Preferences.SetValue](PreferencesSetValue.md)

### Example Databases

- [Preferences/Preferences](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Preferences/Preferences.shtml#1GroupButton78.0000000414.000000097.0000000523.0000000LayoutObjectAnchor_)

### Blog Entries

- [Set initial file for FileMaker 19 by script](https://www.mbsplugins.de/archive/2020-06-17/Set_initial_file_for_FileMaker/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 6.0pr6](https://www.mbsplugins.de/archive/2016-01-13/MBS_FileMaker_Plugin_version_6/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 4th January 2016 , last changed 19th June 2020

  
[Preferences.ClearRecentFiles](PreferencesClearRecentFiles.md) - [Preferences.GetTextSelectionWithDragAndDrop](PreferencesGetTextSelectionWithDragAndDrop.md)

[HTML Version](PreferencesDeleteValue.shtml)