Clear DataTable
Clear DataTable
Section titled “Clear DataTable”Type: clear-datatable · Package: DataTable Activities v1.0.0 · Output: none
Empties a DataTable: removes all its rows but keeps its columns (the schema).
How it works
Section titled “How it works”Removes every row from the table. The columns, their names and types are kept, so you can reuse the table with Add Data Row.
Required parameters
Section titled “Required parameters”| Parameter | Editor | Description |
|---|---|---|
table | expression | The DataTable to clear, e.g. = buffer. |
Optional parameters
Section titled “Optional parameters”None.
Output
Section titled “Output”None — modifies the table in place.
Example
Section titled “Example”Reuse a table as a buffer inside a loop:
Clear DataTable table = = buffer
For Each items = = batch itemVariable = item └─ activities: Add Data Row table = = buffer values: { id: = item.Id, total: = item.Total }Related activities
Section titled “Related activities”- Add Data Row — fill the table again.
- Remove Data Row — remove a single row.
- Build DataTable — create a table from scratch.