Zum Hauptinhalt springen

Update a row in a table

Schrittupdate-rowsaveexterne Wirkung

Finds the row in one of your tables that matches and changes the columns you choose.

Auf einen Blick​

EigenschaftWert
Schrittnameupdate-row
RessourceClusterStep (lumen.ai/v1alpha1)
Palettengruppe, Kategoriesave, tables
Credits1 Credit bei jedem Erfolg
Externe Wirkungja Er ändert etwas außerhalb von Lumen, deshalb fragt ein Wiederholungsversuch vorher nach, und ein Test zeigt, was er tun würde, statt es zu tun.
Die Installation muss bereitstellennichts

Eingaben​

EigenschaftWert
Brauchtnichts
Liefertfields
Arbeitet aufitem einem Dokument nach dem anderen

Braucht und Liefert sind Datentypen (file, text, fields, email). Der Editor bietet einen Schritt nur dort an, wo das, was er braucht, schon auf dem Pfad liegt. Siehe Dokumente und Daten.

Ausgaben​

Ein späterer Knoten verweist auf eine Ausgabe als {nodeId.field} in einem Text oder als nodeId.field in einer Bedingung.

AusgabeTyp
rowIdstring
updatedboolean

Einstellungen​

Wird unter config: im Knoten des Flows gesetzt. Texteinstellungen dürfen Platzhalter wie {nodeId.field} enthalten.

EinstellungTypStandardwertBeschreibung
sheeterforderlichstring-Name of the table whose row to update.minLength 1
basestring-Name of the base (database) the table is in. Optional: when set, the table must belong to this base.minLength 1
whereerforderlichlist of object-Where finds the row: the oldest one that passes every test.minItems 1; maxItems 8
where[].columnerforderlichstring-minLength 1
where[].opstring"eq"Op is eq (the default), contains (text, case-insensitive), or gt, gte, lt, lte (numbers, amounts and dates).one of eq, contains, gt, gte, lt, lte
where[].valueerforderlichstring-
seterforderlichmap of string-Set is what to change, as add-row's mapping: a column name to "{field}", text with {placeholders}, or a plain value. A value that turns out empty leaves its column as it is.
ifMissingstring"fail"IfMissing is fail (the default) or skip, when no row passes.one of fail, skip

Das vollständige JSON Schema dieser Einstellungen: update-row.schema.json.

Beispiel​

config
set:
status: on-hold
sheet: Suppliers
where:
- column: name
op: eq
value: '{supplier}'

Im Flow verwenden​

Ein Knoten, der update-row ausführt, steht unter spec.nodes eines Flow. Geben Sie ihm eine beliebige id und nennen Sie in next die ids der nächsten Knoten.

flow.yaml
apiVersion: lumen.ai/v1alpha1
kind: Flow
metadata:
name: update-row-example
namespace: tenant-acme
spec:
displayName: "Update a row in a table"
triggers:
- id: start
ref: {name: manual-run}
next: [update-row]
nodes:
- id: update-row
stepRef: {name: update-row}
config:
set:
status: on-hold
sheet: Suppliers
where:
- column: name
op: eq
value: '{supplier}'