Saltar al contenido principal

Update a row in a table

Pasoupdate-rowsaveefectos externos

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

De un vistazo​

PropiedadValor
Nombre del pasoupdate-row
RecursoClusterStep (lumen.ai/v1alpha1)
Grupo de la paleta, categoríasave, tables
Créditos1 crédito cada vez que tiene éxito
Efectos externossí Cambia algo fuera de Lumen, así que un reintento pregunta antes y una prueba muestra lo que haría en lugar de hacerlo.
La instalación debe aportarnada

Entradas​

PropiedadValor
Necesitanada
Producefields
Trabaja sobreitem un documento cada vez

Necesita y Produce son tipos de datos (file, text, fields, email). El editor ofrece un paso solo donde lo que necesita ya está en el camino. Consulta Documentos y datos.

Salidas​

Un nodo posterior se refiere a una salida como {nodeId.field} en un texto, o nodeId.field en una condición.

SalidaTipo
rowIdstring
updatedboolean

Ajustes​

Se definen bajo config: en el nodo del flujo. Los ajustes de texto pueden contener marcadores de posición como {nodeId.field}.

AjusteTipoValor por defectoDescripción
sheetobligatoriostring-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
whereobligatoriolist of object-Where finds the row: the oldest one that passes every test.minItems 1; maxItems 8
where[].columnobligatoriostring-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[].valueobligatoriostring-
setobligatoriomap 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

El JSON Schema completo de estos ajustes: update-row.schema.json.

Ejemplo​

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

Úsalo en un flujo​

Un nodo que ejecuta update-row va bajo spec.nodes de un Flow. Dale cualquier id y enumera en next los ids de los nodos siguientes.

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}'