~4 min3 / 14

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.

ParameterTypeRequiredDefaultDescription
CollectionStringYesThe array/list variable to add to
ItemStringYesThe value to add to the collection
IndexStringNoOptional 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.

ParameterTypeRequiredDefaultDescription
CollectionStringYesThe array/list variable to search in
ValueStringYesThe value to look for in the collection
IgnoreCaseBooleanNofalseIf true, performs case-insensitive comparison
ResultBooleanYesVariable 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.

ParameterTypeRequiredDefaultDescription
DataTableDataTableYesThe DataTable variable to iterate over
RowNameStringNocurrentRowVariable name for the current row (default: currentRow)
IndexStringNoVariable name for the current row index (0-based)
ConditionStringNoOptional condition — stop iterating when false
MaxIterationsInt32No0Maximum 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.

ParameterTypeRequiredDefaultDescription
CollectionStringYesThe array, list, or DataTable variable to count
ResultInt32YesVariable 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.

ParameterTypeRequiredDefaultDescription
CollectionStringYesThe array/list variable to remove from
ValueStringNoThe value to remove (first occurrence, or all if RemoveAll is checked)
IndexStringNoIndex of the item to remove (0-based). Takes priority over Value.
RemoveAllBooleanNofalseIf true, removes all occurrences of Value (not just the first)
ResultBooleanNoOptional 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.

ParameterTypeRequiredDefaultDescription
DataTableDataTableYesThe DataTable to aggregate
GroupByColumnsStringNoComma-separated column names to group by, e.g. Department,Year
AggregationsStringNoSemicolon-separated aggregations: Column|FUNCTION|OutputName. E.g. Amount|SUM|TotalAmount;Qty|AVG|AvgQty. Functions: SUM, AVG, COUNT, MIN, MAX
OutputDataTableStringYesVariable 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.

ParameterTypeRequiredDefaultDescription
DataTableDataTableYesThe DataTable to filter
FilterRowsModeStringNoKeepKeep or Remove matching rows Allowed: Keep, Remove
SelectColumnsModeStringNoKeepKeep or Remove selected columns Allowed: Keep, Remove
FilterColumnsStringNoColumn names for filtering (pipe-separated)
FilterOperationsStringNoOperations for filtering (pipe-separated: <, <=, >, >=, =, <>, Contains, etc.)
FilterValuesStringNoValues for filtering (pipe-separated)
SelectedColumnsStringNoColumn names to keep or remove (pipe-separated)
OutputDataTableDataTableYesVariable 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.

ParameterTypeRequiredDefaultDescription
LanguageStringNoCSharpScripting language to execute. C# uses Roslyn in-process; others require the runtime to be on PATH. Allowed: CSharp, JavaScript, PowerShell, Python
CodeStringYesCode to execute. C#: use variables["name"] and return a value. JS/Python/PowerShell: assign __result / $__result for the return value.
OutputVariableStringNoVariable 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.

ParameterTypeRequiredDefaultDescription
LeftTableDataTableYesThe left (primary) DataTable
RightTableDataTableYesThe right DataTable to join with
JoinTypeStringNoInnerType of join to perform Allowed: Inner, Left, Right, Full
LeftJoinColumnsStringYesPipe-separated left column names to join on, e.g. Id|Name
RightJoinColumnsStringYesPipe-separated right column names to join on (same order as Left)
OutputDataTableStringYesVariable 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.

ParameterTypeRequiredDefaultDescription
SourceTableDataTableYesDataTable with rows to merge from
TargetTableDataTableYesDataTable to merge into (base)
MergeActionStringNoUnionUnion: append all rows. Merge: update/insert based on key columns. Allowed: Union, Merge
KeyColumnsStringNoComma-separated columns to match on (required for Merge action), e.g. Id,Name
OutputDataTableStringYesVariable 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.

ParameterTypeRequiredDefaultDescription
DataTableDataTableYesThe DataTable to pivot
RowColumnStringYesColumn whose values become the pivot row keys
ColumnColumnStringYesColumn whose unique values become new column headers
ValueColumnStringYesColumn containing values to aggregate into cells
AggregateFunctionStringNoSUMHow to aggregate multiple values in the same cell Allowed: SUM, AVG, COUNT, MIN, MAX, FIRST
OutputDataTableStringYesVariable name to store the pivoted result

Read CSVRead CSV

Reads data from a CSV file and stores it as a DataTable.

ParameterTypeRequiredDefaultDescription
OutputVariableStringYesVariable name to store the DataTable result
FileStringYesPath to the CSV file. Supports variable references.
DelimiterStringNo,Character used to separate values (default: ',')
AddHeadersBooleanNoTrueWhether the first row contains column headers
EncodingStringNoUTF-8Text encoding (default: 'UTF-8')

Read Range WorkbookRead Excel

Reads data from an Excel workbook (.xlsx) and stores it as a DataTable.

ParameterTypeRequiredDefaultDescription
FilePathStringYesThe full path of the Excel workbook (.xlsx). Supports variable references.
SheetNameStringNoThe name of the sheet from which the data is to be read. If not specified, the first sheet is used.
RangeStringNoSpecifies the range of cells to read (e.g., 'A1:D10'). If empty, reads all used cells in the sheet.
AddHeadersBooleanNoTrueIf enabled, the first row is used as column headers. If disabled, column names are auto-generated (Column1, Column2, etc.)
PasswordStringNoThe password of the workbook (if password-protected)
UseDisplayFormatBooleanNoFalseIf enabled, reads values as they are displayed in Excel (formatted text). If disabled, reads raw cell values.
DataTableStringNoexcelDataVariable 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.

ParameterTypeRequiredDefaultDescription
VariableNameStringYesThe name of the variable to set
ValueStringNoThe value to assign to the variable. Supports expressions and variable references.

Write CSVWrite CSV

Writes a DataTable to a CSV file.

ParameterTypeRequiredDefaultDescription
DataTableStringYesRepresents the input DataTable
FileStringYesFull path of the local CSV file. Text must be quoted
HowToWriteStringNoWriteSpecifies how the CSV file is written (Write or Append)
AddHeadersBooleanNoTrueAdd column headers to the CSV file
DelimiterStringNoCommaCharacter used to separate values
EncodingStringNoUTF-8The character encoding to use
OverwriteBooleanNoTrueIf 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.

ParameterTypeRequiredDefaultDescription
DataTableDataTableYesThe DataTable object containing the data to write to Excel
FileStringYesThe 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.
SheetNameStringNoSheet1The name of the sheet in the workbook where the data will be written. If not specified, data is written to the first sheet.
StartingCellStringNoA1Specifies the starting cell where data should be written (e.g., 'A1', 'B2'). Default is 'A1'.
AddHeadersBooleanNoTrueIf enabled, the column names from the DataTable will be written as the first row
HowToWriteStringNoWriteSpecifies whether to overwrite the file (Write) or append to existing data (Append) Allowed: Write, Append
PasswordStringNoThe password to protect the workbook (optional, not fully supported in current version)
OverwriteBooleanNoTrueIf 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.

ParameterTypeRequiredDefaultDescription
DataTableDataTableYesThe DataTable to add a row to
RowValuesStringNoPipe-separated values for each column, e.g. John|25|NYC. Use 'null' for empty cells.
ArrayVariableStringNoVariable 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.

ParameterTypeRequiredDefaultDescription
ColumnsStringYesComma-separated column names, e.g. Name,Age,City
ColumnTypesStringNoComma-separated types for each column (String, Int32, Double, Boolean, DateTime). Defaults to String.
DataRowsStringNoOptional initial data. Pipe-separated values, semicolon-separated rows. e.g. John|25|NYC;Jane|30|LA
OutputDataTableStringYesVariable 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.

ParameterTypeRequiredDefaultDescription
DataTableDataTableYesDataTable to clear
ClearColumnsBooleanNoFalseIf 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.

ParameterTypeRequiredDefaultDescription
DataTableDataTableYesDataTable variable to get the value from
RowIndexStringYes00-based row index. Use a number (e.g. 0) or a variable (e.g. ${index})
ColumnNameStringNoColumn name in double quotes e.g. "ProductName". Use ${variable} for dynamic column. Leave empty to get the entire DataRow
OutputVariableStringYesVariable 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.

ParameterTypeRequiredDefaultDescription
DataTableDataTableYesThe DataTable to remove rows from
RemoveModeStringNoIndexHow to identify rows to remove Allowed: Index, Condition, Duplicates
RowIndexStringNoRow index (0-based), comma-separated indices (0,2,5), or range (2-5)
ConditionColumnStringNoColumn name to evaluate condition on, or key columns for duplicate removal
ConditionOperatorStringNoEqualsComparison operator for Condition mode Allowed: Equals, NotEquals, Contains, NotContains, StartsWith, EndsWith, Empty, NotEmpty, GreaterThan, LessThan
ConditionValueStringNoValue 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.

ParameterTypeRequiredDefaultDescription
DataTableDataTableYesDataTable to sort
SortByStringYesColumn(s) to sort by. e.g. Name or Age DESC, Name ASC
SortOrderStringNoAscendingDefault sort direction (used when not specified per column) Allowed: Ascending, Descending
OutputDataTableStringYesVariable to store the sorted DataTable
Was this helpful?