Skip to main content

Subtable

1. Field Introduction

A subtable, which can be understood as a table within a table, is used to enter data records of the same format type but with an unspecified number of rows within a single form.

For example:

  • In an order table, enter multiple product order details.
  • In a material requisition application form, enter multiple item details.
  • In an employee profile table, enter multiple educational background details.

2. Ways to Add a Subtable

There are two ways to add a subtable: One is to add a subtable from scratch, which creates a non-entity subtable that requires adding fields to design the data structure. The other is to use an existing worksheet as a subtable, which refers to an existing entity worksheet in the application as a subtable. This method does not allow adding new fields within the current subtable control.

2.1 Adding a Subtable from Scratch

After adding a blank subtable, you can drag and drop field controls from the left side into the subtable to design its structure.

(1) Set the properties of the field controls in the subtable. Click on a field within the subtable to set its properties.

(2) Sort fields within the subtable. Drag the fields within the subtable to adjust their order.

(3) Copy fields within the subtable.

(4) Delete fields within the subtable.

(5) Convert to Worksheet. Click on "Convert to Worksheet" in the subtable properties. Once converted, it becomes an entity worksheet and cannot be reversed.

After converting a subtable to a worksheet, it will appear in the navigation bar on the application's homepage.

Note:

  • Converting a subtable to a worksheet is only a matter of ownership, not a relational link. There is no associated record control between the two tables, but a bidirectional relational link can be manually set to associate the main table and the subtable.
  • After converting a subtable to a worksheet, deleting the subtable field in the main table (order) will not delete the subtable (order details) worksheet.

2.2 Using an Existing Worksheet as a Subtable

Using an existing worksheet as a subtable directly references an existing worksheet in the application. After adding, there is no need to add new fields; you can use the referenced worksheet's fields.

Set the displayed fields in the entity subtable. When referencing an existing worksheet as a subtable, you cannot delete or modify the fields within the subtable. You can only set which fields are visible in the subtable display fields. After setting, the subtable list will only show the visible fields.

3. Bidirectional Association

The bidirectional association between the subtable and the main table is the same as the operation of the bidirectional association between associated records. The difference is that deleting a row record within the subtable in the main table will also delete the record in the converted entity table, rather than just unlinking the associated record.

4. Default Values

4.1 Supports Custom Default Values

Set fixed subtable default values. When adding a new main table record, the subtable row records will be brought out by default. For example, in an interview application form, if the educational background is fixedly set to 2 rows in the subtable, namely University and High School, then every time a new interview application record is created, users will see these two columns of information that need to be filled out.

4.2 Supports Dynamic Values

4.2.1 Other Field Values

For subtables added from scratch, the other field values of the subtable detail fields can refer to the main table fields (including the details of the associated records) and the fields within the subtable (including the details of the associated records within the subtable).

If the default value referenced is a field outside the subtable, when the subtable is converted into a worksheet, its default value field will be displayed as "Deleted".

If you need to continue referencing the main table field as the default value, you need to perform a bidirectional association between the main table and the subtable, and then configure the default value in the subtable's worksheet.

4.2.2 Query Worksheet

By querying a worksheet, you can automatically fill multiple records that meet the conditions into the corresponding fields of the subtable as default values.

For example, when placing an order under "Contract Orders", after selecting the associated "Quotation", the details of the same "Quotation" will be automatically filled from the "Quotation Details" table into the order details fields.

5. Operations

5.1 Can Add Details If checked, users can add subtable data; If users want to set the subtable to be filled automatically only through workflows or default values and not allow manual additions, this option can be unchecked.

5.2 Can Edit Existing Details If you allow users to manually modify the details of the subtable, this option can be checked. If unchecked, users cannot edit the details of the subtable after creation.

5.3 Can Delete Existing Details If checked, users are allowed to delete subtable detail data.

6. Addition Methods

6.1 Single Row Addition The system's default addition method.

6.2 Batch Selection Addition If checked, users can batch select for a specified associated record field when adding subtable row records.

7. Validation

The field is required, and the entire subtable control is set as required, not the subtable detail fields; Detail field validation: If the subtable is created from scratch, each detail field's properties can be set individually; If it is a subtable created by referencing an entity worksheet, it will be validated based on the entity table's field properties.

8. Subtable Detail Field Permissions

Subtable detail field permissions can be set. In custom permission groups, workflow approval nodes, and filling nodes, permissions for subtable detail fields can be set individually.