Edit on GitHub

Set Field

A schema that is used to validate a part of Laboperator workflow templates.

A Set Field action updates a field with a new value.

Set Field
property name*
object or object
one of
  • object
  • object
fieldrequired
reference
Member Name

A reference to a field that is updated with a value when the action is triggered.

valuerequired
reference
Script

A script that returns a value. The value type must match the type of the field that is referenced in the field setting. Different fields allow for different logical and arithmetical operations.

meta
object
reason
string

A reason that is recorded along with a field update if the update requires a reason. See Change Reason schema for more information.

Examples:
set_field:
  field: resultField
  value: data_point.value
  meta:
    reason: Field update via incoming data point from device weight channel
set_field:
  field: myTableData
  patch:
    - path: "'/0/molar_mass'"
      value: 200
      op: replace
    - path: "'/0/final_density'"
      value: myDensity * 3
      op: replace
    - path: myField.myPointer
      value:
        targetValue: 100
        experimentId: abc123
      op: replace
    - path: "'/-'"
      value:
        density: 2 mg/ul
        molar_mass: 100
        type_here: it works
      op: add
    - path: "'/0'"
      value: null
      op: remove
Where is this used?
Other schemas that have a reference ($ref) to this schema.

No references found.