SQL.GetFieldValue
-----------------

Returns field's value.

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

MBS( "SQL.GetFieldValue"; Command; Field ) 

**MBS**( **"SQL.GetFieldValue";** /\* Returns field's value. \*/  
**$Command**; /\* The command reference number gained with [SQL.NewCommand](SQLNewCommand.md). \*/   
**$Field**) /\* The name or one based index of the field. \*/ 

### 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 |

### Result

Returns value or error.

### Description

Returns field's value.  
The value is converted to a FileMaker value with matching type.  
BLOBs are returned as hex strings and not as container values (could be changed).  
NULL values are returned as empty container values.  
### See also

- [SQL.GetFieldAsDate](SQLGetFieldAsDate.md)
- [SQL.GetFieldAsPDF](SQLGetFieldAsPDF.md)
- [SQL.GetFieldAsPNG](SQLGetFieldAsPNG.md)
- [SQL.GetFieldAsTime](SQLGetFieldAsTime.md)
- [SQL.GetFieldIsNull](SQLGetFieldIsNull.md)
- [SQL.GetFieldName](SQLGetFieldName.md)
- [SQL.GetFieldNameList](SQLGetFieldNameList.md)
- [SQL.GetFieldValueList](SQLGetFieldValueList.md)
- [SQL.GetParamValue](SQLGetParamValue.md)
- [SQL.NewCommand](SQLNewCommand.md)

### Release notes

- **Version 8.5**
    - Fixed bug in [SQL.GetFieldValueList](http://www.mbsplugins.eu/SQLGetFieldValueList.shtml) with empty texts being ignored in first field.

### Blog Entries

- [Insert and return new record ID](https://www.mbsplugins.de/archive/2024-06-27/Insert_and_return_new_record_I/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 5.1pr6](https://www.mbsplugins.de/archive/2015-04-23/MBS_FileMaker_Plugin_version_5/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 18th April 2015 , last changed 20th April 2015

  
[SQL.GetFieldOptions](SQLGetFieldOptions.md) - [SQL.GetFieldValueList](SQLGetFieldValueList.md)

[HTML Version](SQLGetFieldValue.shtml)