~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
CollectionStringYes—The array/list variable to add to
ItemStringYes—The value to add to the collection
IndexStringNo—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.

ParameterTypeRequiredDefaultDescription
CollectionStringYes—The array/list variable to search in
ValueStringYes—The value to look for in the collection
IgnoreCaseBooleanNofalseIf true, performs case-insensitive comparison
ResultBooleanYes—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.

ParameterTypeRequiredDefaultDescription
DataTableDataTableYes—The DataTable variable to iterate over
RowNameStringNocurrentRowVariable name for the current row (default: currentRow)
IndexStringNo—Variable name for the current row index (0-based)
ConditionStringNo—Optional 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
CollectionStringYes—The array, list, or DataTable variable to count
ResultInt32Yes—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.

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

ParameterTypeRequiredDefaultDescription
DataTableDataTableYes—The DataTable to aggregate
GroupByColumnsStringNo—Comma-separated column names to group by, e.g. Department,Year
AggregationsStringNo—Semicolon-separated aggregations: Column|FUNCTION|OutputName. E.g. Amount|SUM|TotalAmount;Qty|AVG|AvgQty. Functions: SUM, AVG, COUNT, MIN, MAX
OutputDataTableStringYes—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.

ParameterTypeRequiredDefaultDescription
DataTableDataTableYes—The DataTable to filter
FilterRowsModeStringNoKeepKeep or Remove matching rows Allowed: Keep, Remove
SelectColumnsModeStringNoKeepKeep or Remove selected columns Allowed: Keep, Remove
FilterColumnsStringNo—Column names for filtering (pipe-separated)
FilterOperationsStringNo—Operations for filtering (pipe-separated: <, <=, >, >=, =, <>, Contains, etc.)
FilterValuesStringNo—Values for filtering (pipe-separated)
SelectedColumnsStringNo—Column names to keep or remove (pipe-separated)
OutputDataTableDataTableYes—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.

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

ParameterTypeRequiredDefaultDescription
LeftTableDataTableYes—The left (primary) DataTable
RightTableDataTableYes—The right DataTable to join with
JoinTypeStringNoInnerType of join to perform Allowed: Inner, Left, Right, Full
LeftJoinColumnsStringYes—Pipe-separated left column names to join on, e.g. Id|Name
RightJoinColumnsStringYes—Pipe-separated right column names to join on (same order as Left)
OutputDataTableStringYes—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.

ParameterTypeRequiredDefaultDescription
SourceTableDataTableYes—DataTable with rows to merge from
TargetTableDataTableYes—DataTable to merge into (base)
MergeActionStringNoUnionUnion: append all rows. Merge: update/insert based on key columns. Allowed: Union, Merge
KeyColumnsStringNo—Comma-separated columns to match on (required for Merge action), e.g. Id,Name
OutputDataTableStringYes—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.

ParameterTypeRequiredDefaultDescription
DataTableDataTableYes—The DataTable to pivot
RowColumnStringYes—Column whose values become the pivot row keys
ColumnColumnStringYes—Column whose unique values become new column headers
ValueColumnStringYes—Column containing values to aggregate into cells
AggregateFunctionStringNoSUMHow to aggregate multiple values in the same cell Allowed: SUM, AVG, COUNT, MIN, MAX, FIRST
OutputDataTableStringYes—Variable name to store the pivoted result

Read CSVRead CSV

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

ParameterTypeRequiredDefaultDescription
OutputVariableStringYes—Variable name to store the DataTable result
FileStringYes—Path 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
FilePathStringYes—The full path of the Excel workbook (.xlsx). Supports variable references.
SheetNameStringNo—The name of the sheet from which the data is to be read. If not specified, the first sheet is used.
RangeStringNo—Specifies 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.)
PasswordStringNo—The 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
VariableNameStringYes—The name of the variable to set
ValueStringNo—The value to assign to the variable. Supports expressions and variable references.

Write CSVWrite CSV

Writes a DataTable to a CSV file.

ParameterTypeRequiredDefaultDescription
DataTableStringYes—Represents the input DataTable
FileStringYes—Full 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
DataTableDataTableYes—The DataTable object containing the data to write to Excel
FileStringYes—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.
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
PasswordStringNo—The 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
DataTableDataTableYes—The DataTable to add a row to
RowValuesStringNo—Pipe-separated values for each column, e.g. John|25|NYC. Use 'null' for empty cells.
ArrayVariableStringNo—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.

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

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

ParameterTypeRequiredDefaultDescription
DataTableDataTableYes—The DataTable to remove rows from
RemoveModeStringNoIndexHow to identify rows to remove Allowed: Index, Condition, Duplicates
RowIndexStringNo—Row index (0-based), comma-separated indices (0,2,5), or range (2-5)
ConditionColumnStringNo—Column 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
ConditionValueStringNo—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.

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