Remove Data Row
Remove Data Row
Section titled “Remove Data Row”Type: remove-row · Package: DataTable Activities v1.0.5 · Output: none
Removes a row from a DataTable by its index (zero-based).
How it works
Section titled “How it works”Removes the row at position index (the first row is 0). If the index is out of range, it fails with a clear message and the table does not change. The run log states how many rows remain.
Required parameters
Section titled “Required parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
table | DataTable | — | The DataTable to modify, e.g. customers. |
index | int | — | Position of the row to remove, counting from 0. It must be between 0 and the number of rows minus 1. |
Optional parameters
Section titled “Optional parameters”None.
Output
Section titled “Output”This activity does not return a value; it modifies the table in place.
Common errors
Section titled “Common errors”| Message | Cause 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. |
Row index … is out of range (the table has … rows). | The index is negative or does not exist (also with an empty table). Use rowCount(table) - 1 for the last row. |
Example
Section titled “Example”Remove a repeated header row that a file brings and continue:
Remove Data Row table = people index = 0
Log message = rowCount(people) + " rows left"Related activities
Section titled “Related activities”- Filter DataTable — keep the rows that meet a condition.
- Clear DataTable — empty all rows.
- Find Data Row — locate a row by condition.