Skip to content

Add Column

Type: add-column  ·  Package: DataTable Activities v1.0.0  ·  Output: DataTable

Adds a new calculated column to a DataTable: For each row, evaluates an expression and saves the result to the column. Use it to derive data from existing data — a total with VAT, a category, an “overdue” mark, a combined text.

Steps through the table row by row evaluating the expression value. Row columns are available as variables within that expression: you can reference them by name directly. Returns a new table with the added column.

ParameterEditorDescription
tableexpressionThe DataTable to extend.
columntextName of the new column.
valueexpressionExpression evaluated on each row. The columns of the row are injected as variables.

Ninguno.

Returns a DataTable with the column added.

Add a column TotalConIva from column Total:

Add Column table = = facturas column = "TotalConIva" value = = num(Total) * 1.19 → output: conIva

Here Total refers to column Total of the current row. Wrap it in num(...) or str(...) to safely handle the cell value.

Add Column table = = clientes column = "Saludo" value = = "Estimado/a " + str(Nombre) → output: conSaludo