Matrix.AddRows
--------------

Adds rows to the matrix.

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

MBS( "Matrix.AddRows"; MatrixRef { ; Count } ) 

**MBS**( **"Matrix.AddRows";** /\* Adds rows to the matrix. \*/  
**$MatrixRef**; /\* The matrix reference number.e.g. $matrix \*/   
**$Count**) /\* Optional; The number of rows to add.  
Default is 1.e.g. 2 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| MatrixRef | The matrix reference number. | $matrix |  |
| Count | The number of rows to add.   Default is 1. | 2 | Optional |

### Result

Returns OK or error.

### Description

Adds rows to the matrix.  
### Examples

Add rows and set values:

 Set Variable \[ $r ; Value: MBS ( "Matrix.AddRows";$matrix ; 2 ) \]   
Set Variable \[ $r ; Value: MBS ( "[Matrix.SetRow](MatrixSetRow.md)"; $matrix ; 3; "98¶43¶12¶69" ) \]   
Set Variable \[ $r ; Value: MBS ( "[Matrix.SetRow](MatrixSetRow.md)"; $matrix ; 4; "89¶466¶45¶8" ) \]  
### See also

- [Matrix.Add](MatrixAdd.md)
- [Matrix.AddRow](MatrixAddRow.md)
- [Matrix.SetRow](MatrixSetRow.md)
- [Matrix.SwapRows](MatrixSwapRows.md)

### Blog Entries

- [CSV in FileMaker with MBS FileMaker Plugin](https://www.mbsplugins.de/archive/2022-10-11/CSV_in_FileMaker_with_MBS_File/monkeybreadsoftware_blog_filemaker)
- [Matrix functions for FileMaker](https://www.mbsplugins.de/archive/2019-05-28/Matrix_functions_for_FileMaker/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 4/2019, Seite 31](https://filemaker-magazin.de/neuigkeit/4053-Appetithappen-FMM_201904)

This function checks for a license.

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

  
[Matrix.AddRow](MatrixAddRow.md) - [Matrix.Append](MatrixAppend.md)

[HTML Version](MatrixAddRows.shtml)