SQL.SetFieldOption
------------------

Sets a string value of a specific field option.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [SQL](component_SQL.md) | [2.6](newinversion26.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "SQL.SetFieldOption"; Command; Field; Key; Value ) 

**MBS**( **"SQL.SetFieldOption";** /\* Sets a string value of a specific field option. \*/  
**$Command**; /\* The command reference number gained with [SQL.NewCommand](SQLNewCommand.md). \*/   
**$Field**; /\* The name or one based index of the field. \*/   
**$Key**; /\* A string key of the command option.e.g. "" \*/   
**$Value**) /\* The new option value.e.g. "" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Command | The command reference number gained with [SQL.NewCommand](SQLNewCommand.md). | $Command |
| Field | The name or one based index of the field. | $Field |
| Key | A string key of the command option. | "" |
| Value | The new option value. | "" |

### Result

Returns value or error message.

### Description

Sets a string value of a specific field option.  
  
Call this method to set value(s) of server specific field options. See Server specific notes.  
  
see also:  
[https://www.sqlapi.com/ApiDoc/class\_s\_a\_field.html](https://www.sqlapi.com/ApiDoc/class_s_a_field.html)  
### See also

- [SQL.GetFieldOption](SQLGetFieldOption.md)
- [SQL.GetFieldOptions](SQLGetFieldOptions.md)
- [SQL.NewCommand](SQLNewCommand.md)
- [SQL.SetParamOption](SQLSetParamOption.md)

This function is free to use.

Created 18th August 2014 , last changed 10th January 2020

  
[SQL.SetConnectionTag](SQLSetConnectionTag.md) - [SQL.SetIsolationLevel](SQLSetIsolationLevel.md)

[HTML Version](SQLSetFieldOption.shtml)