---
title: "tbngAddRows"
canonical: "https://support.appfire.com/space/PSJ/15482699/tbngAddRows"
format: markdown
---
> Macro (aura-html)


## Syntax

**tbngAddRows(tableGridNGFieldName, json)**

## Description

This function adds rows to a Table Grid Next Generation custom field.

## Parameters

| Parameter name | Type | Required | Description |
| --- | --- | --- | --- |
| issue key | string | No | The key of the issue which will be changed |
| tableGridNGFieldName | string | Yes | the name of a Table Grid Next Generation custom field. The name can be represented as:<br>- the name
- the id (customfield_NNNNN)
- the alias |
| json | string |  | Json representation of the data of a Table Grid Next Generation custom field |

## Return type

**string[]** - an array of the rows ids of the added rows**.**

## Examples

For all examples we use the default configuration of the custom field:

![image](media://e911bc37-7a01-4e18-9c0c-ca438f1ae46f)


Basic example:

|  |
| --- |
| ```
string json = "[{\"jsummary\":\"Mike Brook\",\"jassignee\":{\"key\":\"admin\"},\"jstatus\":\"Open\"},{\"jsummary\":\"Paul\",\"jassignee\":{\"key\":\"admin\"},\"jstatus\":\"In Progress\"}]";
string[] addedRows = tbngAddRows("TEST-1", "My Grid Field", json);
``` |

In this example we use a struct to construct a json string with the Table Grid Next Generation custom field data:

|  |
| --- |
| ```
struct TbGridAssignee {
    string key;
}
 
struct MyGridFieldRow {
    string jsummary;
    TbGridAssignee jassignee;
    string jstatus;
    string jseq;
}
 
MyGridFieldRow[] myGridFieldRows = {};
 
 
TbGridAssignee tbGridAssignee;
tbGridAssignee.key = "admin";
 
 
MyGridFieldRow myGridFieldRow;
 
myGridFieldRow.jsummary = "Mike Brook";
myGridFieldRow.jassignee = tbGridAssignee;
myGridFieldRow.jstatus = "Open";
myGridFieldRows[0] = myGridFieldRow;
 
 
myGridFieldRow.jsummary = "Paul";
myGridFieldRow.jstatus = "In Progress";
myGridFieldRows[1] = myGridFieldRow;
 
 
string[] addedRows = tbngAddRows(key, "My Grid Field", toJson(myGridFieldRows));
``` |