Skip to end of banner
Go to start of banner

tbngUpdateRows

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

Syntax

tbngUpdateRows(tableGridNGFieldName, stringArray)

Description

This routine 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:

  • 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:

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);
We've encountered an issue exporting this macro. Please try exporting this page again later.
  • No labels