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


## Syntax

**tbngUpdateRows(tableGridNGFieldName, stringArray)**

## Description

This function updates 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 updated |
| 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 |
| stringArray | string[] |  | keyable string array. the key is the rowId of an updated row, the value is a string in JSON format |

## Return type

  


## Examples

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

![image]()

Basic example:

|  |
| --- |
| ```
string[] updates = {};
updates["rowId_5284542f-1539-4b49-841a-ec1aa4d6a7f3"] = "{\"jsummary\":\"Andrew\"}";
updates["rowId_9a22a22e-92c3-43fa-bed6-60bfe2d0a49c"] = "{\"jsummary\":\"Edward\"}";
tbngUpdateRows("TEST-1", "My Grid Field", updates);
``` |

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;
}
 
struct MyGridField {
    string rowId;
    MyGridFieldRow columns;
}
 
struct UpdateRow {
    string jsummary;
}
 
 
MyGridField[] myGridField = fromJson(tbngGetRows("My Grid Field"));
string[] updates;
UpdateRow tempRow;
tempRow.jsummary = "my new summary";
for (MyGridField row in myGridField) {
    updates[row.rowId] = toJson(tempRow);
}
 
tbngUpdateRows(key, "My Grid Field", updates);
``` |