DynaPDF.Table.AddRow
--------------------

Adds a new row to the table.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [DynaPDF](component_DynaPDF.md) | [3.5](newinversion35.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "DynaPDF.Table.AddRow"; Table; Height ) 

**MBS**( **"DynaPDF.Table.AddRow";** /\* Adds a new row to the table. \*/  
**$Table**; /\* The identifier for the table. \*/   
**$Height**) /\* Minimum height or -1 for default height.e.g. 10 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Table | The identifier for the table. | $Table |
| Height | Minimum height or -1 for default height. | 10 |

### Result

Returns error or new row index.

### Description

Adds a new row to the table.   
The parameter Height can be set to a negative value to indicate that the default row height should be used. The default row height was specified in [DynaPDF.Table.Create](DynaPDFTableCreate.md).  
The specified height represents the minimum height of the row. If the height of a foreground object is larger than the height will be adjusted.  
The height is sometimes required. This is the case when a cell is rotated by 90 or a multiple of 90 degrees and if the height cannot be computed from the cell contents, e.g. if a cell contains text and if the flag NoLineBreak is absent. See [DynaPDF.Table.SetCellOrientation](DynaPDFTableSetCellOrientation.md) for further information.  
  
If the function succeeds, the return value is the row index, a value greater or equal zero. If the function fails, the return value is a negative error code.  
### Examples

Adds a row:

 MBS ("DynaPDF.Table.AddRow"; $table )  
Adds a header row:

 #Add header row   
Set Variable \[$row ; Value:MBS ("DynaPDF.Table.AddRow"; $table )\]  
Set Variable \[$r ; Value:MBS ("[DynaPDF.Table.SetCellText](DynaPDFTableSetCellText.md)"; $table ; $row ; 0; "right"; "top"; "Index")\]  
Set Variable \[$r ; Value:MBS ("[DynaPDF.Table.SetCellText](DynaPDFTableSetCellText.md)"; $table ; $row ; 1; "left"; "top"; "Product")\]  
Set Variable \[$r ; Value:MBS ("[DynaPDF.Table.SetCellText](DynaPDFTableSetCellText.md)"; $table ; $row ; 2; "right"; "top"; "Price")\]  
Set Variable \[$r ; Value:MBS ("[DynaPDF.Table.SetCellText](DynaPDFTableSetCellText.md)"; $table ; $row ; 3; "right"; "top"; "Quantity")\]  
Set Variable \[$r ; Value:MBS ("[DynaPDF.Table.SetCellText](DynaPDFTableSetCellText.md)"; $table ; $row ; 4; "right"; "top"; "Total Price")\]  
\# set flag for header row   
Set Variable \[$r ; Value:MBS ("[DynaPDF.Table.SetFlags](DynaPDFTableSetFlags.md)"; $table ; $row ; -1; "HeaderRow")\]  
\# make row bold   
Set Variable \[$r ; Value:MBS ("[DynaPDF.Table.SetFont](DynaPDFTableSetFont.md)"; $table ; $row ; -1; "Helvetica"; 2; 1; "unicode")\]  
### See also

- [DynaPDF.Table.AddColumn](DynaPDFTableAddColumn.md)
- [DynaPDF.Table.AddRows](DynaPDFTableAddRows.md)
- [DynaPDF.Table.ClearRow](DynaPDFTableClearRow.md)
- [DynaPDF.Table.Create](DynaPDFTableCreate.md)
- [DynaPDF.Table.Draw](DynaPDFTableDraw.md)
- [DynaPDF.Table.SetCellImage](DynaPDFTableSetCellImage.md)
- [DynaPDF.Table.SetCellOrientation](DynaPDFTableSetCellOrientation.md)
- [DynaPDF.Table.SetCellText](DynaPDFTableSetCellText.md)
- [DynaPDF.Table.SetFlags](DynaPDFTableSetFlags.md)
- [FM.Loop](FMLoop.md)

### Example Databases

- [DynaPDF/Book Creation](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Book%20Creation.shtml#3ScriptAnchor_)
- [DynaPDF/Catalog with tables](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Catalog%20with%20tables.shtml#1ScriptAnchor_)
- [DynaPDF/Invoice/Invoice](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Invoice/Invoice.shtml#3ScriptAnchor_)
- [DynaPDF/Merge PDFs](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Merge%20PDFs.shtml#5ScriptAnchor_)
- [DynaPDF/Report](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Report.shtml#1ScriptAnchor_)
- [DynaPDF/Tables](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Tables.shtml#1ScriptAnchor_)

### Blog Entries

- [Merge PDF with table of contents](https://www.mbsplugins.de/archive/2020-02-25/Merge_PDF_with_table_of_conten/monkeybreadsoftware_blog_filemaker)
- [New FM.Loop function](https://www.mbsplugins.de/archive/2018-03-30/New_FMLoop_function/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th August 2014 , last changed 21st January 2022

  
[DynaPDF.Table.AddColumn](DynaPDFTableAddColumn.md) - [DynaPDF.Table.AddRows](DynaPDFTableAddRows.md)

[HTML Version](DynaPDFTableAddRow.shtml)