Skip to content
Agentivity
Star on GitHub Start free

Read and write a Data Table from a workflow

A workflow can keep what it did in a Data Table, and read from it. In our example, each time a payment reminder is approved, the workflow adds a row to the table reminders.

Both are in the Nodes catalog, under Core > Data.

NodeShapeWhat it is
Data TableA circleThe table itself. You choose which table of your workspace it stands for.
DataTableA boxA step that does one operation on the table.
  1. Drag DataTable onto the canvas, and link it to the step before it.
  2. Drag Data Table onto the canvas, below the step.
  3. Right-click the circle Data Table, select Edit, choose your table, and select Apply.
  4. Drag from the diamond of the circle to the diamond of the step DataTable. A dotted line links them.

Until a table is linked, the window of the step says “No Data Table connected”.

  1. Right-click the step DataTable and select Edit.
  2. In Operation, choose what the step does.
OperationWhat it doesWhat you give
InsertAdds a row.A value for each column you want to fill.
FindGets one row.The id of the row.
SelectGets several rows.Nothing, to get every row. Or a column and a value, to get only the rows that match.
UpdateChanges a row.The id of the row, and the new values.
DeleteDeletes a row.The id of the row.
  1. For Insert and Update, add the values under Column values: select the plus button, choose a column, and give its value. A value can be typed, or it can be an output of an earlier step.
  2. Select Apply, then Publish.

The step produces outputs that the next steps can use.

OutputWhat it holds
rowThe row that was added, changed or found.
rowsThe rows that were selected.
countThe number of rows concerned.
successWhether the operation worked.

For example, after a Select, a For Each step can repeat the next steps for each row.

  1. Run the workflow. See Run a workflow and follow each step.
  2. Open the table in Resources > Data Tables. After an Insert, the new row is there.
  • “No Data Table connected.” The circle Data Table is not linked to the diamond of the step.
  • “Data Table not found.” The table was deleted, or the circle points to no table. Open the circle and choose a table.
  • “Column not found in current table.” A column was renamed or deleted since the step was set up. Open the step and choose the column again.
  • “ID is required for this operation.” Find, Update and Delete need the id of a row.

Let an agent read and fill a Data Table.