Automation
Data steps
Data steps read and write records through a view. Read with filters, create and update records, bulk import, and group writes in a transaction.
Esta página aún no se ha traducido. Estás leyendo el original.
Data steps read and write records. Every read and write goes through a view you pick on the step, never straight to the table. That view's filter, hidden columns, and read-only columns apply, just as they do for people. So pick a view that shows exactly the records the process should work with.
Read records#
Read DataView reads records from a view. You can add a filter and a limit. It returns the matching records and the total count. Connect its output to For Each to handle the records one by one.
To build a filter from values earlier in the run, such as the customer on this order or the status someone chose:
- Make Filter builds one condition from a column, an operator, and a value.
- Make Filter Group combines conditions with AND or OR. Connect the group to Read DataView.
If the filter never changes, set it on the step directly.
Use the fields of a record#
Break Entry splits a record into its fields, one output per column, so later steps can use the customer, the status, or the total.
Write records#
| Step | What it does |
|---|---|
| Write DataView | Creates, updates, upserts, or deletes one record through a view. An upsert updates the record that matches on a column you pick, such as an order number, or creates it if there's no match. Returns the record. |
| Make Payload | Builds the values for a write, with one input per column. |
| Update Entry Field | Sets one field on an existing record. |
| Archive Entry | Archives a record. |
| Restore Entry | Brings back an archived record. |
Writes from these steps run the table's business rules, just like a save by a person. If a validation or guard refuses the write, the step fails. Use Try / Catch / Finally if the workflow should handle that.
Import many records at once#
Bulk Upsert DataView writes many records in one step, matched on a column you pick, such as an article number. Use it for a large import or a regular sync. Map Array to Payloads turns a list of items into records ready for a bulk upsert, without a loop.
Group writes in a transaction#
When several writes must all succeed or all fail, such as an order and its lines, or moving stock from one location to another, put them in one ACID-compliant database transaction with Begin Transaction.
- Add Begin Transaction.
- Put the reads and writes on its Body path, and connect each one's transaction input to the Begin Transaction step.
- End the body by connecting back to Commit to keep the changes, or to Rollback to undo them all.
- Continue the workflow from After.
If anything inside the body fails, none of the writes are kept.
Plan your data steps#
For each read, name the view and the filter. For each write, name the view, the operation, and the fields. List writes that must agree and put them in one transaction. If you use a bulk upsert, note that business rules don't run, and add the needed checks before it.
Debates sobre esta página
¿Te has atascado o echas algo en falta? Pregunta a la comunidad.