Skip to content

Child Object

The Child Object field represents the parent-child relationship between models, and stores the path of the parent node of the current record when storing data.

Description

ItemContent
CategoryAssociation Relationship
SortableNo
FilterableYes
Supported Filter TypesEmpty, Not Empty, Parent Object Equal, Root Node Equal, Parent Object Contains

Settings

SettingDescription
Allow emptySet whether the field is required
Placeholder in form when not filledText information displayed in the input box when no information is entered in the field
Fields to displayCan set the fields displayed by the table in the form page, supports adding buttons in the list
Behavior when deleting nodesCan set the behavior to be executed when deleting a record, option values:
Delete all child nodesDo not allow deletion when there are child nodes
Child object name fieldCan select a single-line text and function type field in this table as the name of the child object

Child Table Settings

Field SettingDescription
Returned field listSet the list of fields returned when querying data
Use the following fields as filter conditionsCan use fields in the related table as filter conditions for the table, supporting adding fuzzy filters
Combined filter conditionsSet combined filter conditions for the sub-table, which will be displayed as tabs after adding
Sorting methodCan use fields in the current table as the sorting method for table data
Default number of items per pageSet the number of records loaded per page in the data list
Allow clicking to open form pageSet whether to allow viewing the details of records in the related list
Maximum list heightSet the maximum height of the child object field displayed in the form
Data selection modeSet the data selection method of the child object field in the form
Option values: NoneCheckboxSingle Selection
Set records meeting the following conditions as non-selectableUse expressions to control whether records can be selected
Display modeSet the data display method of the child object field in the form
Option values: TableCardForm
Grouping fieldSet the default grouping field for the list data in the child object field
Display the following fields in the tableSet the list of header fields displayed in the related list
Table styleCan set the style of the displayed table, support multiple selections
Option values: Show serial numberShow borderShow stripe
Table inline edit trigger methodSet the trigger method for inline editing
Child object fieldCan select a child object field in the current table, after setting the child object field, the table will be displayed as a tree table
Table row heightCan set the table row height of this field on the form page
Option values: SmallMediumLarge
Maximum table heightSet the maximum height of the field table
Cell formatCan set the cell format of the table in the field through rules, supports setting multiple rules
Allow clicking to open form pageSet whether to allow clicking on records in the table to view the details of the record
Display controls in the sub-table toolbarCan add custom buttons to the toolbar of the table form page, supporting grouping of buttons

Operations After Creating Child Table

Set field values of child table records after main table records are created successfullyDescription
FieldFields of child table records set after creation
Default valueField values of child table records set after creation

Database Storage Format

Field TypeDescription
ltreeTags for data stored in a hierarchical tree structure

Logical Relationship of Child Objects

Child objects are strings composed of tags and separators, such as: recordId1.recordId2.recordId3

  • Tag: The record ID of the parent level
  • Path: The tag itself is also the path

For example, the structure of the data table department is as follows

FieldTypeDescription
idStringRecord ID
nameSingle-line TextName
parentChild ObjectParent-child relationship between departments

The data in the table is as follows

idnameparent
0000Headquarters
0001Technical Department0000
0002Product Department0000
0003Operations Department0000
0004Technical Group 10000.0001
0005Technical Group 20000.0001

The above data table content identifies the parent-child relationship as follows

Parent-Child Relationship

Event Trigger when Modifying Child Objects

The child object field stores the path of the parent node of the current record. When the parent node of a record changes, the system will automatically modify the child object field of all child nodes of that record. For example, the data in the table is as follows

idnameparent
0001Company 1
0002Company 2
0011Technical Department0001
0012Technical Group 10001.0011

In the above example, when the Technical Department is moved under Company 2, its parent field will be updated to 0002 and the parent field of Technical Group 1 will also be updated to 0002.0011. The updated data is as follows

idnameparent
0001Company 1
0002Company 2
0011Technical Department0002
0012Technical Group 10002.0011

It should be noted that the operation of moving a node will only trigger the data table change event of the moved node, and the child nodes of the moved node will not trigger the data table change event.

Display Effect

Display Effect