Matrix.AddRow
-------------

Adds a row 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.AddRow"; MatrixRef ) 

**MBS**( **"Matrix.AddRow";** /\* Adds a row to the matrix. \*/  
**$MatrixRef**) /\* The matrix reference number.e.g. $matrix \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| MatrixRef | The matrix reference number. | $matrix |

### Result

Returns OK or error.

### Description

Adds a row to the matrix.  
Use [Matrix.New](MatrixNew.md) or [Matrix.NewWithSQL](MatrixNewWithSQL.md) to create the matrix object before adding something to it.  
### Examples

Add row and set values:

 Set Variable \[ $r ; Value: MBS ( “Matrix.AddRow";$matrix ) \]   
Set Variable \[ $row ; Value: MBS ( “[Matrix.Height](MatrixHeight.md)";$matrix ) - 1 \]   
Set Variable \[ $r ; Value: MBS ( "[Matrix.SetRow](MatrixSetRow.md)"; $matrix ; $row ; "98¶43¶12¶69" ) \]  
### See also

- [Matrix.Add](MatrixAdd.md)
- [Matrix.AddRows](MatrixAddRows.md)
- [Matrix.GetRow](MatrixGetRow.md)
- [Matrix.Height](MatrixHeight.md)
- [Matrix.New](MatrixNew.md)
- [Matrix.NewWithSQL](MatrixNewWithSQL.md)
- [Matrix.SetRow](MatrixSetRow.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)

This function checks for a license.

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

  
[Matrix.AddColumns](MatrixAddColumns.md) - [Matrix.AddRows](MatrixAddRows.md)

[HTML Version](MatrixAddRow.shtml)