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.
| Parameter | Type | Required | Description |
|---|
| Variable | String (variable name) | Yes | Target variable to assign to |
| Value | Expression / String | Yes | Value or expression (e.g., ${"$"}{count} + 1, "Hello") |
| 1 | Assign Variable="totalAmount" Value="${subtotal} * 1.18" |
| 2 | Assign Variable="greeting" Value="Hello, {userName{'}'}" |
| 3 | Assign 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.
| Parameter | Type | Default | Description |
|---|
| Message | String / Expression | — | Text to log. Supports variable references. |
| Level | Debug | Info | Warning | Error | Info | Severity level shown in the Output panel |
Message Box
Displays a modal dialog during execution and optionally returns the button the user clicked.
| Parameter | Type | Default | Description |
|---|
| Title | String | Genzbots | Dialog window title |
| Message | String | — | Message text to display |
| Buttons | OK | OKCancel | YesNo | YesNoCancel | OK | Which buttons to show |
| Output | String variable | — | Variable to store the clicked button name |
Read CSV
Reads a CSV file into a DataTable variable.
| Parameter | Type | Required | Description |
|---|
| FilePath | String | Yes | Path to the .csv file |
| HasHeaders | Boolean | No (default: true) | Treat the first row as column names |
| Delimiter | String | No (default: ,) | Column separator character |
| OutputVariable | String | Yes | Variable to store the resulting DataTable |
Write CSV
Writes a DataTable variable to a CSV file.
| Parameter | Type | Required | Description |
|---|
| DataVariable | String | Yes | Variable containing the DataTable to write |
| FilePath | String | Yes | Target file path |
| WriteHeaders | Boolean | No (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.
| Parameter | Type | Required | Description |
|---|
| Columns | Column list (name + type) | Yes | Column definitions — edited via the DataTable builder in Properties |
| OutputVariable | String | Yes | Variable to store the new DataTable |
Add Data Row
Appends a new row to an existing DataTable.
| Parameter | Type | Required | Description |
|---|
| DataVariable | String | Yes | Variable holding the DataTable |
| RowValues | Array / Object | Yes | Values 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.
| Parameter | Type | Required | Description |
|---|
| DataVariable | String | Yes | DataTable variable |
| RowIndex | Int32 | Yes | Zero-based index of the row to remove |
Filter Data Table
Returns a new DataTable containing only rows matching a filter expression.
| Parameter | Type | Required | Description |
|---|
| DataVariable | String | Yes | Source DataTable variable |
| Condition | String | Yes | SQL-like WHERE clause, e.g. Amount > 1000 or Status = "Active" |
| OutputVariable | String | Yes | Variable to store the filtered DataTable |
Sort Data Table
Sorts a DataTable by one or more columns.
| Parameter | Type | Required | Description |
|---|
| DataVariable | String | Yes | DataTable variable to sort |
| SortExpression | String | Yes | Column + direction, e.g. Amount DESC or Name ASC, Date DESC |
| OutputVariable | String | No | Store 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.
| Parameter | Type | Required | Description |
|---|
| DataVariable | String | Yes | DataTable to iterate |
| RowVariable | String | Yes | Variable name for the current row (access columns via ${"$"}{row["ColName"]}) |
| Body | Activity sequence | Yes | Activities to run for each row |
| 1 | For 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).
| Parameter | Type | Required | Description |
|---|
| FirstTable | String | Yes | Left DataTable variable |
| SecondTable | String | Yes | Right DataTable variable |
| JoinType | Inner | Left | Full | No (default: Inner) | Type of join |
| JoinColumn | String | Yes | Column name to join on (must exist in both tables) |
| OutputVariable | String | Yes | Variable to store the resulting DataTable |
Aggregate Data Table
Computes an aggregate (Sum, Count, Min, Max, Average) over a column in a DataTable.
| Parameter | Type | Required | Description |
|---|
| DataVariable | String | Yes | Source DataTable |
| Column | String | Yes | Column to aggregate |
| Function | Sum | Count | Min | Max | Average | Yes | Aggregation function |
| OutputVariable | String | Yes | Stores the aggregated value |
Merge Data Tables
Appends all rows from a second DataTable into the first (must have matching schema).
| Parameter | Type | Required | Description |
|---|
| TargetTable | String | Yes | DataTable to append rows into |
| SourceTable | String | Yes | DataTable whose rows are appended |
Clear Data Table
Removes all rows from a DataTable while preserving its column schema.
| Parameter | Type | Required | Description |
|---|
| DataVariable | String | Yes | DataTable variable to clear |
Get Row Item
Reads a single cell value from a DataRow variable.
| Parameter | Type | Required | Description |
|---|
| RowVariable | String | Yes | DataRow variable |
| Column | String | Yes | Column name or index |
| OutputVariable | String | Yes | Variable 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.
| Parameter | Type | Required | Description |
|---|
| Code | String (C# source) | Yes | Inline C# code. Use the Code editor in Properties for syntax highlighting. |
| InputVariables | List of variable names | No | Variables to pass into the code as parameters |
| OutputVariables | List of variable names | No | Variables to update after execution |
| 1 | |
| 2 | int start = (int)inputs["startDate"]; |
| 3 | int end = (int)inputs["endDate"]; |
| 4 | |
| 5 | outputs["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.