Skip to content

Add a New Row in Table

Feature Description

Add a new row record in the tables of Related List, Child Object, and Lookup List fields in the Table View form

Parameter Settings

Configuration ItemDescription
Data TableThe data table type of the record
Use Record as Default ValueUse an expression to return a string. If a value is set, the creation page will use this record as the default value for the fields. For example, for the copy function, you can set the record ID to be copied here
Field Default ValueSet the default value for the specified fields when creating records through the button

Example

In the data table module or form page, we need a create button. When clicked, it can directly add a new row in the table. After completing the data entry, save to create data. For example, in the employee information section shown in the figure below, we have a child table called Leave Details. The create button in the child table toolbar can directly add a new row in the child table. After completing the information, click Save to create a record in the child table.

To configure the above add button, you need to add a create button in the toolbar of the list type field. Select Add a New Row in Table as the execution action for the configuration item. Select the module where data needs to be created for the Data Table of the configuration item, which is the child table (Leave Details) in this case

When creating data, we often have the need to set default field values. For example, when creating child table data, we need to set the child table to be associated with the current record by default. For example, the create button in this case creates a leave record in the employee record of Li Si, so the employee of this leave record needs to be Li Si by default. We can implement this function through the Field Default Value of the configuration item. As shown in the figure below, add the employee field in this configuration item, and set the default value to the id of the current record through an expression. We can also use an existing record as the default value, which can be achieved by obtaining the record id of the same module through an expression in the Use Record as Default Value in the configuration item. For example, if we want to create the next leave record with the selected leave record as the default value, the configuration method is as shown in the figure below Use Record as Default Value Configuration.