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: 10.1   10.2   10.3   10.4   10.5   11.0   11.1   11.2   11.3   11.4    Statistic    FMM    Blog  


Inserts records in FileMaker database from records in memory.

Component Version macOS Windows Linux Server iOS SDK
Matrix 9.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "Matrix.InsertRecords"; MatrixRef; InsertFileName; InsertTableName; FieldNames { ; StartRow; EndRow } )   More


Parameter Description Example Flags
MatrixRef The matrix reference number. $matrix
InsertFileName The file name of where the insert table is inside. Can be empty to look for the table in all files. Get(FileName)
InsertTableName The name of the table to insert record into. "Assets"
FieldNames A list of field names for the insert.
Empty entries in the list are ignored.
StartRow The index of the start row in the current recordset.
First row is 0.
0 Optional
EndRow The index of the end row in the current recordset.
First row is 0. Last Row would be FM.SQL.RowCount-1.
0 Optional


Returns OK or error.


Inserts records in FileMaker database from records in memory.
This function allows to easily copy a lot of records from a query in FileMaker database into a FileMaker table.
Please provide field names in FileMaker. The order has to match those in the record set.
Due to passing in new field names, you can even rearrange values from one column to other while copying. In the SQL you can use functions for sums or join data from several tables together to fill a new table.
Use FM.ExecuteSQL.LastErrorMessage and FM.ExecuteSQL.LastError to see error message.
Reports an error if field name list doesn't match column count of the query result.
Function will fail if data types in source and dest fields do not match for assignment. e.g. date and time fields will not work, only timestamp fields.

For insert from SQL Connection into FileMaker database, please use SQL.InsertRecords.

See also

Release notes

  • Version 11.0
    • Enhanced Matrix.InsertRecords to detect field data type and pass numbers and date/time/timestamp to FileMaker.

Blog Entries

Created 8th April 2019, last changed 8th April 2019

Matrix.Height - Matrix.InsertRecordsToSQL

Feedback: Report problem or ask question.

MBS Xojo tutorial videos

Start Chat