Skip to content

Relation List

Relation List field represents references to data in another table. Relation list represents one-to-many relationships between models.

Description

ItemContent
CategoryAssociation Relationships
SortableNo
FilterableYes
Supported Filter TypesContains, Does Not Contain, Empty, Not Empty, In List, Not In List

Settings

SettingDescription
Allow EmptySet whether the field is required
Placeholder When EmptyText displayed in the input box when the field has no input
Associated TableSelect the data table module that this field needs to be associated with

Sub-table Settings

Field SettingsDescription
Returned Field ListSet the list of fields returned when querying data
Use the Following Fields as Filter ConditionsCan use fields in the associated 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 in tabs after adding
Sorting MethodCan use fields in the associated table as sorting methods for table data
Default Records per PageSet the number of records loaded per page in the data list
Allow Clicking to Open Form PagesSet whether to allow viewing the details of records in the relation list
Maximum List HeightSet the maximum height displayed by the relation list field in the form
Data Selection ModeSet the data selection method for the relation list field in the form
Options: None, Checkbox, Radio
Set Records Meeting the Following Conditions as UnselectableUse expressions to control whether records can be selected
Display ModeSet the data display method for the relation list field in the form
Options: Table, Card, Form
Grouping FieldSet the default grouping field for list data in the relation list field
Display the Following Fields in TableSet the list of header fields displayed in the relation list
Table StyleCan set the style of the displayed table, supporting multiple selections
Options: Display Serial Number, Display Border, Display Stripes
Table Inline Edit Trigger MethodSet the inline edit trigger method
Sub-object FieldCan select a sub-object field in the associated table, after setting the sub-object field, the table will be displayed as a tree table
Table Row HeightCan set the table row height of the field on the form page
Options: Small, Medium, Large
Table Maximum HeightCan set the maximum height of the field's table
Cell FormattingCan set the cell format of the table in the field through rules, supports setting multiple rules
Allow Clicking to Open Form PagesSet whether to allow viewing the details of records in the table by clicking on them
Display Buttons in Table ToolbarCan add custom buttons to the toolbar of the table form page, supporting grouping of buttons

Operations After Creating Sub-table Records

Set Field Values of Sub-table Records After Main Table Records Are Successfully CreatedDescription
FieldSub-table record field to be set after creation
Default ValueField value of sub-table record to be set after creation

Filter Condition Search Settings

Search SettingsDescription
Display StyleOpening method of the search page
Record Display Name FieldName of the item displayed in the condition box after the record is selected
Width of Search PageSet the display width of the search page
Table StyleSet the style of the displayed table, supporting
Options: Display Serial Number, Display Border, Display Stripes
Table BorderSet the table border type, supporting
Options: Display All Borders, Display Only Outer Borders, Display Only Horizontal Table Lines, Do Not Display Borders, Outer Borders and Horizontal Table Lines
Sub-object FieldCan select a sub-object field in the associated table, after setting the sub-object field, the table will be displayed as a tree table
Do Not Allow Selecting Records That Meet ConditionsUse expressions to control whether records can be selected
Use the Following Fields as Search ConditionsCan use fields in the search list table as filter conditions for the table
Display the Following Fields in TableSet the list of header fields displayed in the search list
Filter Condition Optional Data FilterSet the data returned by the search list
Sorting MethodCan use fields in the associated table as sorting methods for table data
Cell FormattingCan set the cell format of the table in the field through rules, supports setting multiple rules

Database Storage Format

Not stored in the database

Relation list represents one-to-many relationships between models. For each relation record field, the system creates a separate adjacency table for storage. The name of the adjacency table is z_appId_tableId_fieldId, where appId is the application id, tableId is the internal id of the main table, and fieldId is the internal id of the field.

The structure of the adjacency table is as follows:

FieldTypeDescription
idintMain table record ID
relation_idvarcharSub-table record ID
indexintSorting
create_timedateCreation time

After deleting the relation list field, the system will delete the adjacency table.

Actions When Referenced Table Records Are Deleted

When records in the referenced data table are deleted, different behaviors will be triggered according to the deletion settings of the referenced table:

  • Not Allowed to Delete When Referenced: If the referenced table has this option set, when deleting data from the referenced table, if there are relation lists referencing the records, deletion of records from the referenced table is not allowed
  • Set Related Records in Reference Data to Empty or Delete Referenced Data in Related Lists After Deletion: If the referenced table has this option set, the data dependent in the relation list will be deleted

Usage in Automation and Scripts

Relation list fields are stored separately using adjacency tables. When querying record information in automation and scripts, the values of relation lists will not be returned. You need to call automation steps or script functions to query them separately. When creating, relation lists can be saved by setting field values. When modifying and deleting, you need to call automation steps or script functions.

Display Mode

Using Expressions as "View" Button Text

This configuration is used to modify the text of the button that opens the field in the table.

Display Controls in Sub-table Toolbar