FM.UpdateRecords3
-----------------

Updates existing records in a table in one line.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [FM](component_FM.md) [FMSQL](component_FMSQL.md) | [8.0](newinversion80.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "FM.UpdateRecords3"; FileName; TableName; IDField1; IDValue1; IDField2; IDValue2; IDField3; IDValue3; FieldName...; FieldValue... ) 

**MBS**( **"FM.UpdateRecords3";** /\* Updates existing records in a table in one line. \*/  
**$FileName**; /\* The file name of where the table is inside. Can be empty to look for the table in all files.e.g. Get(FileName) \*/   
**$TableName**; /\* The name of the table to insert record into.  
Can be ID of table, so we lookup name by ID.   
Can be result of GetFieldName() function as we remove field name automatically.e.g. "Assets" \*/   
**$IDField1**; /\* The name of the field which provides an unique ID for each record, so we can identify the field.  
Can be ID of field, so we lookup name by ID.   
Can be result of GetFieldName() function as we remove table name automatically.e.g. "ID1" \*/   
**$IDValue1**; /\* The value for the ID field to identify the record.  
Data type of parameter must match the data type of the field.e.g. $RecordID \*/   
**$IDField2**; /\* The name of the field which provides an unique ID for each record, so we can identify the field.  
Can be ID of field, so we lookup name by ID.   
Can be result of GetFieldName() function as we remove table name automatically.e.g. "ID2" \*/   
**$IDValue2**; /\* The value for the ID field to identify the record.  
Data type of parameter must match the data type of the field.e.g. $RelatedRecordID \*/   
**$IDField3**; /\* The name of the field which provides an unique ID for each record, so we can identify the field.  
Can be ID of field, so we lookup name by ID.   
Can be result of GetFieldName() function as we remove table name automatically.e.g. "ID3" \*/   
**$IDValue3**; /\* The value for the ID field to identify the record.  
Data type of parameter must match the data type of the field.e.g. $OtherRecordID \*/   
**$FieldName...**; /\* A field name to set.  
Can be ID of field, so we lookup name by ID.   
Can be result of GetFieldName() function as we remove table name automatically.e.g. "Model" \*/   
**$FieldValue...**) /\* A field value to use for setting the field in the parameter before.  
Data type of parameter must match the data type of the field.e.g. "Test" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| FileName | The file name of where the table is inside. Can be empty to look for the table in all files. | Get(FileName) |
| TableName | The name of the table to insert record into.   Can be ID of table, so we lookup name by ID.    Can be result of GetFieldName() function as we remove field name automatically. | "Assets" |
| IDField1 | The name of the field which provides an unique ID for each record, so we can identify the field.   Can be ID of field, so we lookup name by ID.    Can be result of GetFieldName() function as we remove table name automatically. | "ID1" |
| IDValue1 | The value for the ID field to identify the record.   Data type of parameter must match the data type of the field. | $RecordID |
| IDField2 | The name of the field which provides an unique ID for each record, so we can identify the field.   Can be ID of field, so we lookup name by ID.    Can be result of GetFieldName() function as we remove table name automatically. | "ID2" |
| IDValue2 | The value for the ID field to identify the record.   Data type of parameter must match the data type of the field. | $RelatedRecordID |
| IDField3 | The name of the field which provides an unique ID for each record, so we can identify the field.   Can be ID of field, so we lookup name by ID.    Can be result of GetFieldName() function as we remove table name automatically. | "ID3" |
| IDValue3 | The value for the ID field to identify the record.   Data type of parameter must match the data type of the field. | $OtherRecordID |
| FieldName... | A field name to set.   Can be ID of field, so we lookup name by ID.    Can be result of GetFieldName() function as we remove table name automatically. | "Model" |
| FieldValue... | A field value to use for setting the field in the parameter before.   Data type of parameter must match the data type of the field. | "Test" |

### Result

Returns OK or error.

### Description

Updates existing records in a table in one line.  
Same as [FM.UpdateRecords](FMUpdateRecords.md), but with three key fields.  
Same as [FM.UpdateRecord3](FMUpdateRecord3.md), but changes multiple records.  
  
You can use [FM.ExecuteSQL.LastSQL](FMExecuteSQLLastSQL.md) function to see later what SQL was created and run.  
Please consider using newer [JSON.UpdateRecord](JSONUpdateRecord.md) and [JSON.UpdateRecords](JSONUpdateRecords.md) functions as they take a variable number of primary keys.  
  
This function takes variable number of parameters. Pass as much parameters as needed separated by the semicolon in FileMaker.  
Please repeat FieldName and FieldValue parameters as often as you need.  
### Examples

Update record with three key fields:

 MBS ( "FM.UpdateRecords3"; Get(FileName);   
"Kontakte"; // table name  
"Vorname"; "Joe"; // first key field  
"Nachname"; "Miller"; // second key field  
"Firma"; "Test Company"; // third key field  
"Position"; "CEO"; // first field to update  
"Website"; "https://www.mbsplugins.de/filemaker" ) // second field to update  
### See also

- [FM.ExecuteSQL.LastSQL](FMExecuteSQLLastSQL.md)
- [FM.UpdateRecord](FMUpdateRecord.md)
- [FM.UpdateRecord2](FMUpdateRecord2.md)
- [FM.UpdateRecord3](FMUpdateRecord3.md)
- [FM.UpdateRecord5](FMUpdateRecord5.md)
- [FM.UpdateRecords2](FMUpdateRecords2.md)
- [FM.UpdateRecords4](FMUpdateRecords4.md)
- [FM.UpdateRecords5](FMUpdateRecords5.md)
- [JSON.UpdateRecord](JSONUpdateRecord.md)
- [JSON.UpdateRecords](JSONUpdateRecords.md)

### Release notes

- **Version 8.0**
    - Added [FM.UpdateRecord2](http://www.mbsplugins.eu/FMUpdateRecord2.shtml), [FM.UpdateRecord3](http://www.mbsplugins.eu/FMUpdateRecord3.shtml), [FM.UpdateRecords2](http://www.mbsplugins.eu/FMUpdateRecords2.shtml) and [FM.UpdateRecords3](http://www.mbsplugins.eu/FMUpdateRecords3.shtml).

### Blog Entries

- [MBS FileMaker Advent calendar - Door 18 - Update](https://www.mbsplugins.de/archive/2025-12-18/MBS_FileMaker_Advent_calendar_/monkeybreadsoftware_blog_filemaker)
- [Insert or update with JSON](https://www.mbsplugins.de/archive/2024-08-28/Insert_or_update_with_JSON/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 7.6pr1](https://www.mbsplugins.de/archive/2017-12-06/MBS_FileMaker_Plugin_version_7/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 3th December 2017 , last changed 10th July 2025

  
[FM.UpdateRecords2](FMUpdateRecords2.md) - [FM.UpdateRecords4](FMUpdateRecords4.md)

[HTML Version](FMUpdateRecords3.shtml)