Skip to content

Set Field Values in Currently Open Form

Overview

Set field values in the create form or detail form opened on the client side.

Parameter Configuration

ParameterDescription
Data TableThe data table to which the opened record form belongs
Field ValueSet the default value of the field. Dynamic content can be specified using expressions to get context variables

Notes

  • For the lookup list type, if you want to create new data in the form, do not set the id field in the data to be passed.

  • In the form editing page, the form field storage mode is save after modifying a single field

    • When setting the value of a list-type (associated list, sub-object, lookup list) field and the field is hidden, this operation will be invalid, and you need to call automation to change the data yourself.
  • Fields that are not displayed in the form can also be assigned values in this way (they will be automatically saved when saved)

  • For list-type fields sub-object, associated list, and lookup list, an array type needs to be passed. For example, if the data table structure displayed by the list type is:

    Field IdentifierField NameField Type
    nameNameSingle-line Text
    ageAgeNumber

    The required data structure to be passed is:

    text
    ${      
        [
          { 'id':'0001', 'name':'Zhang San', 'age':20 }, // Updated data
          { 'name':'Li Si', 'age':22 }, // New data
          { 'id':'0002', '$deleted':true } // Deleted data
        ]
    }

    In the above example:

    • If the id attribute is not set, it means the data is newly added.
    • If the id attribute has a value and $deleted is set to true, it means to delete this data.
    • If the id attribute has a value, it means to update this record. Fields not listed will not be updated.