Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 12.0   12.1   12.2   12.3   12.4   12.5   13.0   13.1   13.2   13.3    Statistic    FMM    Blog  


Queries field value for given position in result.

Component Version macOS Windows Linux Server iOS SDK
FM FMSQL 5.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "FM.SQL.Field"; SQLref; Row; Column { ; Flags } )   More


Parameter Description Example Flags
SQLref The reference number returned by FM.SQL.Execute function. $SQLRef
Row The row number from 0 to FM.SQL.RowCount-1. $row
Column The column number from 0 to FM.SQL.FieldCount-1. $col
Flags Available in MBS FileMaker Plugin 12.1 or newer.
Various flags.
Pass 0 to return value as it is. (default)
Pass 1 to return file name of a container field.
Pass 2 to return container data base64 encoded.
0 Optional


Returns value or error.


Queries field value for given position in result.
Native data type is preserved so this function can returns text, number, time, date, timestamp and container.


Query field values:

Set Variable [$sql; Value:MBS( "FM.SQL.Execute"; ""; "select * from Clients")]
# query first field of first row:
Set Variable [$value; MBS( "FM.SQL.Field"; $sql; 0; 0 )
# query other field
Set Variable [$value; MBS( "FM.SQL.Field"; $sql; $row; $col )
Set Variable [$r; MBS( "FM.SQL.Release"; $sql )

See also

Release notes

  • Version 13.2
    • Fixed FM.SQL.Field function to handle flags better.
    • Fixed FM.SQL.Field function to return a name if there is no FNAM stream.
  • Version 12.1
    • Added flags to FM.SQL.Field function to return containers as base64 or just their file name.

Example Databases

Blog Entries

This function checks for a paid license.

Created 18th April 2015, last changed 21st April 2023

FM.SQL.Execute - FM.SQL.FieldCount

💬 Ask a question or report a problem

Start Chat