Skip to content

Add Data Row

Type: add-row  ·  Package: DataTable Activities v1.0.0  ·  Output: DataRow

Adds a new row at the end of a DataTable and returns the created row.

Creates a row with the values you provide and appends it to the table. Returns the created DataRow, so you can keep working on it with Set Cell or Update Data Row.

The values are given in two forms (a toggle in the editor):

  • By column — a dictionary { column: value }. Order-independent; validates the column name.
  • By position — a list of values in column order. You must provide exactly one value per column.
ParameterEditorDescription
tableexpressionThe DataTable to append the row to, e.g. = customers.
valuesrow valuesThe row values, by column { column: value } or by position [v1, v2, …].

None.

Returns the newly created DataRow.

Build a table and add rows in both ways:

Build DataTable data: [ { id: 1, name: "Ana", age: 30 } ] → output: people
Add Data Row table = = people values (by column): { id: 2, name: "Luis", age: 25 } → output: row
Add Data Row table = = people values (by position): [ 3, "Carla", 28 ]
Log message = = "The table has " + rowCount(people) + " rows"