Skip to content

Get Data Row

Type: get-row  ·  Package: DataTable Activities v1.0.5  ·  Output: DataRow

Returns the row (DataRow) at a specific position of a DataTable.

Reads the row at position index (the first one is 0) and returns it. If the index is out of range, it fails with a clear message stating how many rows the table has. It does not modify the table.

With the row you can read cells with Get Cell or modify it with Set Cell / Update Data Row — remember that the row stays linked to its table, so modifying it changes the table.

ParameterTypeDefaultDescription
tableDataTable—The DataTable to read from, e.g. customers.
indexint—Row position, counting from 0. It must be between 0 and the number of rows minus 1.

None.

Returns the DataRow at that position (the table’s own row, not a copy).

MessageCause and fix
'table' must be a DataTable.table does not evaluate to a DataTable.
Row index '…' is not a valid integer.index is not an integer (for example, a text).
Row index … is out of range (the table has … rows).The index is negative or greater than or equal to the number of rows; it also happens with an empty table. Check first with rowCount(table) > 0.
Get Data Row table = people index = 0 → output: first
Set Cell row = first column = "age" value = 99
Log message = "Name: " + str(first["name"])