~4 min3 / 12

Data & Variables Activities

Activities for assigning variables, reading/writing CSV files, building and transforming DataTables, iterating rows, and running inline C# code. These cover everyday data manipulation without leaving the workflow designer.

Assign

Sets the value of a variable. The Value field supports arithmetic, string concatenation, and ${varName} references. Wrap plain string literals in quotes to prevent them being treated as variable names.

ParameterTypeRequiredDescription
VariableString (variable name)YesTarget variable to assign to
ValueExpression / StringYesValue or expression (e.g., ${"$"}{count} + 1, "Hello")
workflow
1Assign Variable="totalAmount" Value="${subtotal} * 1.18"
2Assign Variable="greeting" Value="Hello, {userName{'}'}"
3Assign Variable="today" Value="${currentDate}"

Set Variable

Alias for Assign. Identical parameters. Appears in some legacy workflows as SetVariable — automatically normalized to Set Variable on load.

Log

Writes a message to the Output panel during execution. Essential for debugging workflows.

ParameterTypeDefaultDescription
MessageString / ExpressionText to log. Supports variable references.
LevelDebug | Info | Warning | ErrorInfoSeverity level shown in the Output panel

Message Box

Displays a modal dialog during execution and optionally returns the button the user clicked.

ParameterTypeDefaultDescription
TitleStringGenzbotsDialog window title
MessageStringMessage text to display
ButtonsOK | OKCancel | YesNo | YesNoCancelOKWhich buttons to show
OutputString variableVariable to store the clicked button name

Read CSV

Reads a CSV file into a DataTable variable.

ParameterTypeRequiredDescription
FilePathStringYesPath to the .csv file
HasHeadersBooleanNo (default: true)Treat the first row as column names
DelimiterStringNo (default: ,)Column separator character
OutputVariableStringYesVariable to store the resulting DataTable

Write CSV

Writes a DataTable variable to a CSV file.

ParameterTypeRequiredDescription
DataVariableStringYesVariable containing the DataTable to write
FilePathStringYesTarget file path
WriteHeadersBooleanNo (default: true)Include column headers in the first row

Build Data Table

Creates a new DataTable with user-defined columns. The column editor (in the Properties panel) lets you specify each column name and type. Optionally pre-populate with initial rows.

ParameterTypeRequiredDescription
ColumnsColumn list (name + type)YesColumn definitions — edited via the DataTable builder in Properties
OutputVariableStringYesVariable to store the new DataTable

Add Data Row

Appends a new row to an existing DataTable.

ParameterTypeRequiredDescription
DataVariableStringYesVariable holding the DataTable
RowValuesArray / ObjectYesValues for each column in order, or a Dictionary keyed by column name

Remove Data Row

Removes a row at a given index from a DataTable.

ParameterTypeRequiredDescription
DataVariableStringYesDataTable variable
RowIndexInt32YesZero-based index of the row to remove

Filter Data Table

Returns a new DataTable containing only rows matching a filter expression.

ParameterTypeRequiredDescription
DataVariableStringYesSource DataTable variable
ConditionStringYesSQL-like WHERE clause, e.g. Amount > 1000 or Status = "Active"
OutputVariableStringYesVariable to store the filtered DataTable

Sort Data Table

Sorts a DataTable by one or more columns.

ParameterTypeRequiredDescription
DataVariableStringYesDataTable variable to sort
SortExpressionStringYesColumn + direction, e.g. Amount DESC or Name ASC, Date DESC
OutputVariableStringNoStore result in a new variable (sorts in-place if omitted)

For Each Row

Iterates over every row in a DataTable. The current row is available as a DataRow variable inside the body.

ParameterTypeRequiredDescription
DataVariableStringYesDataTable to iterate
RowVariableStringYesVariable name for the current row (access columns via ${"$"}{row["ColName"]})
BodyActivity sequenceYesActivities to run for each row
workflow
1For Each Row DataVariable="${salesTable}" RowVariable="row"
2 Body:
3 Log Message: "Processing {row["OrderId"]{'}'}"
4 Type Into: Text="{row["Amount"]{'}'}" ...

Join Data Tables

Joins two DataTables on a key column (inner, left, or full join).

ParameterTypeRequiredDescription
FirstTableStringYesLeft DataTable variable
SecondTableStringYesRight DataTable variable
JoinTypeInner | Left | FullNo (default: Inner)Type of join
JoinColumnStringYesColumn name to join on (must exist in both tables)
OutputVariableStringYesVariable to store the resulting DataTable

Aggregate Data Table

Computes an aggregate (Sum, Count, Min, Max, Average) over a column in a DataTable.

ParameterTypeRequiredDescription
DataVariableStringYesSource DataTable
ColumnStringYesColumn to aggregate
FunctionSum | Count | Min | Max | AverageYesAggregation function
OutputVariableStringYesStores the aggregated value

Merge Data Tables

Appends all rows from a second DataTable into the first (must have matching schema).

ParameterTypeRequiredDescription
TargetTableStringYesDataTable to append rows into
SourceTableStringYesDataTable whose rows are appended

Clear Data Table

Removes all rows from a DataTable while preserving its column schema.

ParameterTypeRequiredDescription
DataVariableStringYesDataTable variable to clear

Get Row Item

Reads a single cell value from a DataRow variable.

ParameterTypeRequiredDescription
RowVariableStringYesDataRow variable
ColumnStringYesColumn name or index
OutputVariableStringYesVariable to store the cell value

Invoke Code

Executes inline C# code within the workflow. Useful for complex transformations that are easier to express in code than with activity chains. The code block receives all current workflow variables as inputs and can write results back.

ParameterTypeRequiredDescription
CodeString (C# source)YesInline C# code. Use the Code editor in Properties for syntax highlighting.
InputVariablesList of variable namesNoVariables to pass into the code as parameters
OutputVariablesList of variable namesNoVariables to update after execution
workflow
1// Example: compute business days between two dates
2int start = (int)inputs["startDate"];
3int end = (int)inputs["endDate"];
4// ... calculation ...
5outputs["businessDays"] = result;
DataTable vs CollectionUse DataTable activities for tabular (row/column) data, e.g., spreadsheet contents. Use For Each (Flow Control) for simple list variables like StringArray or List.
Was this helpful?