Matrix.InsertRow
----------------

Inserts one row into a matrix.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Matrix](component_Matrix.md) | [15.3](newinversion153.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "Matrix.InsertRow"; MatrixRef; Row ) 

**MBS**( **"Matrix.InsertRow";** /\* Inserts one row into a matrix. \*/  
**$MatrixRef**; /\* The matrix reference number.e.g. $matrix \*/   
**$Row**) /\* The zero based row number.e.g. 2 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| MatrixRef | The matrix reference number. | $matrix |
| Row | The zero based row number. | 2 |

### Result

Returns OK or error.

### Description

Inserts one row into a matrix.  
### Examples

Try it and insert one row:

 Let(\[  
 matrix = MBS ("[Matrix.New](MatrixNew.md)"; 4; 4);  
 r = MBS ( "[Matrix.SetRow](MatrixSetRow.md)"; matrix; 0; "00¶01¶02¶03" );  
 r = MBS ( "[Matrix.SetRow](MatrixSetRow.md)"; matrix; 1; "10¶11¶12¶13" );  
 r = MBS ( "[Matrix.SetRow](MatrixSetRow.md)"; matrix; 2; "20¶21¶22¶23" );  
 r = MBS ( "[Matrix.SetRow](MatrixSetRow.md)"; matrix; 3; "30¶31¶32¶33" );  
 r = MBS ("Matrix.InsertRow"; matrix; 2);  
 csv = MBS ("[Matrix.CSV](MatrixCSV.md)"; matrix)  
\]; csv)  
### See also

- [Matrix.CSV](MatrixCSV.md)
- [Matrix.New](MatrixNew.md)
- [Matrix.SetRow](MatrixSetRow.md)

### Release notes

- **Version 15.3**
    - Added [Matrix.InsertRow](https://www.mbsplugins.eu/MatrixInsertRow.shtml) and [Matrix.InsertColumn](https://www.mbsplugins.eu/MatrixInsertColumn.shtml) functions.

### Blog Entries

- [MBS FileMaker Plugin 15.3 News](https://www.mbsplugins.de/archive/2025-07-29/MBS_FileMaker_Plugin_153_News/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 15.3pr1](https://www.mbsplugins.de/archive/2025-06-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 22nd May 2025 , last changed 22nd May 2025

  
[Matrix.InsertRecordsToSQL](MatrixInsertRecordsToSQL.md) - [Matrix.JSONRecord](MatrixJSONRecord.md)

[HTML Version](MatrixInsertRow.shtml)