FM.UpdateRecord5
----------------

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) | [14.5](newinversion145.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "FM.UpdateRecord5"; FileName; TableName; IDField1; IDValue1; IDField2; IDValue2; IDField3; IDValue3; IDField4; IDValue4; IDField5; IDValue5; FieldName...; FieldValue... ) 

**MBS**( **"FM.UpdateRecord5";** /\* 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 \*/   
**$IDField4**; /\* 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. "ID4" \*/   
**$IDValue4**; /\* The value for the ID field to identify the record.  
Data type of parameter must match the data type of the field.e.g. $ForthRecordID \*/   
**$IDField5**; /\* 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. "ID5" \*/   
**$IDValue5**; /\* The value for the ID field to identify the record.  
Data type of parameter must match the data type of the field.e.g. $FifthRecordID \*/   
**$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 |
| IDField4 | 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. | "ID4" |
| IDValue4 | The value for the ID field to identify the record.   Data type of parameter must match the data type of the field. | $ForthRecordID |
| IDField5 | 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. | "ID5" |
| IDValue5 | The value for the ID field to identify the record.   Data type of parameter must match the data type of the field. | $FifthRecordID |
| 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.UpdateRecord](FMUpdateRecord.md), but with five key fields.  
  
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 a field if 5 key fields match:

 MBS ( "FM.UpdateRecord5"; ""; "Kontakte"; "Titel"; "Herr"; "Vorname"; "Joe"; "Nachname"; "Miller"; "Position"; "CEO"; "Firma"; "Test"; "Website"; "http://mbsplugin.eu" )  
### See also

- [FM.ExecuteSQL](FMExecuteSQL.md)
- [FM.ExecuteSQL.LastSQL](FMExecuteSQLLastSQL.md)
- [FM.UpdateRecord](FMUpdateRecord.md)
- [FM.UpdateRecord2](FMUpdateRecord2.md)
- [FM.UpdateRecord3](FMUpdateRecord3.md)
- [FM.UpdateRecords3](FMUpdateRecords3.md)
- [FM.UpdateRecords4](FMUpdateRecords4.md)
- [FM.UpdateRecords5](FMUpdateRecords5.md)
- [JSON.UpdateRecord](JSONUpdateRecord.md)
- [JSON.UpdateRecords](JSONUpdateRecords.md)

### Release notes

- **Version 14.5**
    - Added [FM.UpdateRecord4](https://www.mbsplugins.eu/FMUpdateRecord4.shtml), [FM.UpdateRecord5](https://www.mbsplugins.eu/FMUpdateRecord5.shtml), [FM.UpdateRecords4](https://www.mbsplugins.eu/FMUpdateRecords4.shtml) and [FM.UpdateRecords5](https://www.mbsplugins.eu/FMUpdateRecords5.shtml) functions.

### Blog Entries

- [MBS FileMaker Advent calendar - Door 18 - Update](https://www.mbsplugins.de/archive/2025-12-18/MBS_FileMaker_Advent_calendar_/monkeybreadsoftware_blog_filemaker)
- [New in MBS FileMaker Plugin in Version 14.5](https://www.mbsplugins.de/archive/2025-01-08/New_in_MBS_FileMaker_Plugin_in/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 14.5pr4](https://www.mbsplugins.de/archive/2024-10-25/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th October 2024 , last changed 29th September 2025

  
[FM.UpdateRecord4](FMUpdateRecord4.md) - [FM.UpdateRecords](FMUpdateRecords.md)

[HTML Version](FMUpdateRecord5.shtml)