Data, DataTable & Collection Activities
Activities for assigning variables, reading and writing CSV/Excel files, building and transforming DataTables, iterating rows, filtering/sorting/joining/aggregating tabular data, and managing in-memory collections.
Collection (5)
Add To CollectionAdd To Collection
Adds an item to an array or list variable. The collection is updated with the new item appended.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
Collection | String | Yes | — | The array/list variable to add to |
Item | String | Yes | — | The value to add to the collection |
Index | String | No | — | Optional index to insert at (leave empty to append to end) |
Collection ContainsCollection Contains
Checks whether an array or list contains a specified value and stores the Boolean result in a variable.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
Collection | String | Yes | — | The array/list variable to search in |
Value | String | Yes | — | The value to look for in the collection |
IgnoreCase | Boolean | No | false | If true, performs case-insensitive comparison |
Result | Boolean | Yes | — | Variable to store the Boolean result (true if found) |
For Each RowFor Each Row
Loops over each row in a DataTable. Each iteration makes the current row available as a DataRow variable.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
DataTable | DataTable | Yes | — | The DataTable variable to iterate over |
RowName | String | No | currentRow | Variable name for the current row (default: currentRow) |
Index | String | No | — | Variable name for the current row index (0-based) |
Condition | String | No | — | Optional condition — stop iterating when false |
MaxIterations | Int32 | No | 0 | Maximum number of rows to process (0 = no limit) |
Get Collection CountGet Collection Count
Gets the count or length of an array, list, or DataTable and stores it in an integer variable.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
Collection | String | Yes | — | The array, list, or DataTable variable to count |
Result | Int32 | Yes | — | Variable to store the item count (integer) |
Remove From CollectionRemove From Collection
Removes an item from an array or list by value or by index. The collection variable is updated in place.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
Collection | String | Yes | — | The array/list variable to remove from |
Value | String | No | — | The value to remove (first occurrence, or all if RemoveAll is checked) |
Index | String | No | — | Index of the item to remove (0-based). Takes priority over Value. |
RemoveAll | Boolean | No | false | If true, removes all occurrences of Value (not just the first) |
Result | Boolean | No | — | Optional variable to store whether an item was actually removed |
Data (11)
Aggregate Data TableAggregate Data Table
Groups a DataTable by columns and computes SUM, AVG, COUNT, MIN, or MAX aggregations.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
DataTable | DataTable | Yes | — | The DataTable to aggregate |
GroupByColumns | String | No | — | Comma-separated column names to group by, e.g. Department,Year |
Aggregations | String | No | — | Semicolon-separated aggregations: Column|FUNCTION|OutputName. E.g. Amount|SUM|TotalAmount;Qty|AVG|AvgQty. Functions: SUM, AVG, COUNT, MIN, MAX |
OutputDataTable | String | Yes | — | Variable name to store the aggregated result |
Filter Data TableFilter Data Table
Filters a DataTable by keeping or removing rows and columns based on specified conditions.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
DataTable | DataTable | Yes | — | The DataTable to filter |
FilterRowsMode | String | No | Keep | Keep or Remove matching rows Allowed: Keep, Remove |
SelectColumnsMode | String | No | Keep | Keep or Remove selected columns Allowed: Keep, Remove |
FilterColumns | String | No | — | Column names for filtering (pipe-separated) |
FilterOperations | String | No | — | Operations for filtering (pipe-separated: <, <=, >, >=, =, <>, Contains, etc.) |
FilterValues | String | No | — | Values for filtering (pipe-separated) |
SelectedColumns | String | No | — | Column names to keep or remove (pipe-separated) |
OutputDataTable | DataTable | Yes | — | Variable name to store the filtered DataTable |
Invoke CodeInvoke Code
Executes a code snippet (C#, JavaScript, PowerShell, or Python) at runtime. Access workflow variables via the 'variables' dictionary/object. Assign '__result' (or return a value in C#) to store output in OutputVariable.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
Language | String | No | CSharp | Scripting language to execute. C# uses Roslyn in-process; others require the runtime to be on PATH. Allowed: CSharp, JavaScript, PowerShell, Python |
Code | String | Yes | — | Code to execute. C#: use variables["name"] and return a value. JS/Python/PowerShell: assign __result / $__result for the return value. |
OutputVariable | String | No | — | Variable name to store the script's return value (optional) |
Join Data TablesJoin Data Tables
Joins two DataTables using Inner, Left, Right, or Full join on one or more key columns.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
LeftTable | DataTable | Yes | — | The left (primary) DataTable |
RightTable | DataTable | Yes | — | The right DataTable to join with |
JoinType | String | No | Inner | Type of join to perform Allowed: Inner, Left, Right, Full |
LeftJoinColumns | String | Yes | — | Pipe-separated left column names to join on, e.g. Id|Name |
RightJoinColumns | String | Yes | — | Pipe-separated right column names to join on (same order as Left) |
OutputDataTable | String | Yes | — | Variable name to store the joined result |
Merge Data TablesMerge Data Tables
Merges two DataTables. Union appends all rows; Merge updates/inserts based on key columns.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
SourceTable | DataTable | Yes | — | DataTable with rows to merge from |
TargetTable | DataTable | Yes | — | DataTable to merge into (base) |
MergeAction | String | No | Union | Union: append all rows. Merge: update/insert based on key columns. Allowed: Union, Merge |
KeyColumns | String | No | — | Comma-separated columns to match on (required for Merge action), e.g. Id,Name |
OutputDataTable | String | Yes | — | Variable name to store the merged result |
Pivot Data TablePivot Data Table
Converts rows to columns (pivot). Turns unique values of one column into new column headers with aggregated values.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
DataTable | DataTable | Yes | — | The DataTable to pivot |
RowColumn | String | Yes | — | Column whose values become the pivot row keys |
ColumnColumn | String | Yes | — | Column whose unique values become new column headers |
ValueColumn | String | Yes | — | Column containing values to aggregate into cells |
AggregateFunction | String | No | SUM | How to aggregate multiple values in the same cell Allowed: SUM, AVG, COUNT, MIN, MAX, FIRST |
OutputDataTable | String | Yes | — | Variable name to store the pivoted result |
Read CSVRead CSV
Reads data from a CSV file and stores it as a DataTable.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
OutputVariable | String | Yes | — | Variable name to store the DataTable result |
File | String | Yes | — | Path to the CSV file. Supports variable references. |
Delimiter | String | No | , | Character used to separate values (default: ',') |
AddHeaders | Boolean | No | True | Whether the first row contains column headers |
Encoding | String | No | UTF-8 | Text encoding (default: 'UTF-8') |
Read Range WorkbookRead Excel
Reads data from an Excel workbook (.xlsx) and stores it as a DataTable.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
FilePath | String | Yes | — | The full path of the Excel workbook (.xlsx). Supports variable references. |
SheetName | String | No | — | The name of the sheet from which the data is to be read. If not specified, the first sheet is used. |
Range | String | No | — | Specifies the range of cells to read (e.g., 'A1:D10'). If empty, reads all used cells in the sheet. |
AddHeaders | Boolean | No | True | If enabled, the first row is used as column headers. If disabled, column names are auto-generated (Column1, Column2, etc.) |
Password | String | No | — | The password of the workbook (if password-protected) |
UseDisplayFormat | Boolean | No | False | If enabled, reads values as they are displayed in Excel (formatted text). If disabled, reads raw cell values. |
DataTable | String | No | excelData | Variable name to store the DataTable result. Defaults to 'excelData' if not specified. |
Set VariableSet Variable
Set a variable to a value. Simpler alternative to Assign.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
VariableName | String | Yes | — | The name of the variable to set |
Value | String | No | — | The value to assign to the variable. Supports expressions and variable references. |
Write CSVWrite CSV
Writes a DataTable to a CSV file.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
DataTable | String | Yes | — | Represents the input DataTable |
File | String | Yes | — | Full path of the local CSV file. Text must be quoted |
HowToWrite | String | No | Write | Specifies how the CSV file is written (Write or Append) |
AddHeaders | Boolean | No | True | Add column headers to the CSV file |
Delimiter | String | No | Comma | Character used to separate values |
Encoding | String | No | UTF-8 | The character encoding to use |
Overwrite | Boolean | No | True | If enabled, an existing file with the same name will be overwritten. If disabled, the activity will fail when the file already exists. |
Write Range WorkbookWrite Excel
Writes a DataTable to an Excel file (.xlsx) with support for sheet name, starting cell, headers, and password protection.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
DataTable | DataTable | Yes | — | The DataTable object containing the data to write to Excel |
File | String | Yes | — | The full path of the Excel file (.xlsx or .xls). If the file exists, data will be written to it; otherwise, a new file will be created. |
SheetName | String | No | Sheet1 | The name of the sheet in the workbook where the data will be written. If not specified, data is written to the first sheet. |
StartingCell | String | No | A1 | Specifies the starting cell where data should be written (e.g., 'A1', 'B2'). Default is 'A1'. |
AddHeaders | Boolean | No | True | If enabled, the column names from the DataTable will be written as the first row |
HowToWrite | String | No | Write | Specifies whether to overwrite the file (Write) or append to existing data (Append) Allowed: Write, Append |
Password | String | No | — | The password to protect the workbook (optional, not fully supported in current version) |
Overwrite | Boolean | No | True | If enabled, an existing file with the same name will be overwritten. If disabled, the activity will fail when the file already exists. |
DataTable (6)
Add Data RowAdd Data Row
Adds a new row to an existing DataTable with the specified column values.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
DataTable | DataTable | Yes | — | The DataTable to add a row to |
RowValues | String | No | — | Pipe-separated values for each column, e.g. John|25|NYC. Use 'null' for empty cells. |
ArrayVariable | String | No | — | Variable containing an array, list, or DataRow with the values to add. Used if RowValues is empty. |
Build Data TableBuild Data Table
Creates a new DataTable with specified column definitions and optional initial rows of data.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
Columns | String | Yes | — | Comma-separated column names, e.g. Name,Age,City |
ColumnTypes | String | No | — | Comma-separated types for each column (String, Int32, Double, Boolean, DateTime). Defaults to String. |
DataRows | String | No | — | Optional initial data. Pipe-separated values, semicolon-separated rows. e.g. John|25|NYC;Jane|30|LA |
OutputDataTable | String | Yes | — | Variable name to store the new DataTable |
Clear Data TableClear Data Table
Clears all rows from a DataTable. Optionally removes all columns too, resetting the DataTable to an empty state.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
DataTable | DataTable | Yes | — | DataTable to clear |
ClearColumns | Boolean | No | False | If True, also removes all columns (full reset). Default: False (rows only). |
Get Row ItemGet Row Item
Gets a value from a specific cell (row + column) in a DataTable, or retrieves an entire DataRow.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
DataTable | DataTable | Yes | — | DataTable variable to get the value from |
RowIndex | String | Yes | 0 | 0-based row index. Use a number (e.g. 0) or a variable (e.g. ${index}) |
ColumnName | String | No | — | Column name in double quotes e.g. "ProductName". Use ${variable} for dynamic column. Leave empty to get the entire DataRow |
OutputVariable | String | Yes | — | Variable to store the retrieved value or DataRow |
Remove Data RowRemove Data Row
Removes one or more rows from a DataTable by row index, index range, or a column-based condition.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
DataTable | DataTable | Yes | — | The DataTable to remove rows from |
RemoveMode | String | No | Index | How to identify rows to remove Allowed: Index, Condition, Duplicates |
RowIndex | String | No | — | Row index (0-based), comma-separated indices (0,2,5), or range (2-5) |
ConditionColumn | String | No | — | Column name to evaluate condition on, or key columns for duplicate removal |
ConditionOperator | String | No | Equals | Comparison operator for Condition mode Allowed: Equals, NotEquals, Contains, NotContains, StartsWith, EndsWith, Empty, NotEmpty, GreaterThan, LessThan |
ConditionValue | String | No | — | Value to compare against |
Sort Data TableSort Data Table
Sorts a DataTable by one or more columns in ascending or descending order and outputs the sorted result.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
DataTable | DataTable | Yes | — | DataTable to sort |
SortBy | String | Yes | — | Column(s) to sort by. e.g. Name or Age DESC, Name ASC |
SortOrder | String | No | Ascending | Default sort direction (used when not specified per column) Allowed: Ascending, Descending |
OutputDataTable | String | Yes | — | Variable to store the sorted DataTable |