Skip to main content

Difference between Subform and Relationship


I. Subform and Relationship

Example: Add expense details data to an expense request.

1. Relationship with the main worksheet Expense Request

  • If it is a subform field: Although the "expense details" subform contains multiple fields, it is still considered a field of the main worksheet. The relationship between the main worksheet and subform is an inclusion relationship. When the expense request record is deleted, the subform data is also deleted.

  • If it is a relationship field: The expense details worksheet is related to the expense request worksheet, and the two worksheets can be unlinked and exist independently.

2. Ways of adding data

When filling in an expense request and needing to add multiple expense details:

  • If it is a subform field, you can add rows one by one on the same page without opening a new window.

  • If it is a relationship field, it supports adding data in a similar way as a subform, and also supports adding records in the form of cards or dropdowns.

2. Conversion Between Subform and Relationship

In practice, there isn't a strict distinction between adding data through a subform or a related worksheet. Both methods may meet your needs. However, we provide some reference points:

  • If the data to be added is not entity data but derivative data without independent significance, then use a subform field, such as adding expense details to an expense request record.

  • If the data being added is an independent business object that can exist on its own, then use a relationship field. For example, the company worksheet and the contact worksheet are two business objects. A contact may be an independent entity, so they are not strictly in an inclusion relationship, and in such cases, data is added through relationship fields.

If you are unsure whether to use a subform field or a relationship field, don't worry. We support the conversion between subforms (already converted to entity worksheets or referencing existing worksheets) and relationship fields, without affecting existing data.

Conversion