Docs›Building forms

Subforms & linked records

Raise a child record under a parent: an action under a finding, an inspection under a permit.

www.tebelis.ai/records
A child record raised under its parent, linked both ways.

When to use a subform

Some records belong under another one: a corrective action under a non-conformance, an inspection under a permit, a snag under a handover. A subform lets a record raise child records from another template, linked both ways. Open the parent and you see its children; open a child and it links back to its parent.

Add one to a template

In the builder, open the Flow & Rules tab on the right. The Subforms card sits under the workflow. Click + Add subform and pick the child template. Only published forms are offered, so publish the child form first. A form can't be its own subform. Each subform has:

  • Section heading: what the section is called on the record.
  • Allow more than one: one child, or as many as the work needs.
  • Position: after a chosen field, or at the bottom of the form.
  • Show when / Require when: conditions, so the section appears (or becomes required) only when it's relevant.
  • Always require at least one: the section is required whenever it's shown, not only when a condition holds.

A required subform is checked like a required field: the record can't move forward from a step the subform belongs to until the subform has at least one submitted child. A child counts once it has left the first step of its own workflow, so a draft that was added but never sent on doesn't count. A child form with no workflow counts as soon as it's added. A subform belongs to the steps where the field it's placed under can be edited; one at the bottom of the form, or under a field with no steps set, belongs to every step, and so does one whose condition uses the record's status. So submitting checks only the subforms that belong to the first step, and a subform placed under a later step's field is checked when the record moves on from that step. Sending a record back to an earlier step is never blocked, and neither is rejecting or cancelling it: an action that moves the record to a rejected or cancelled status doesn't need its subforms, though its required fields still have to be filled in.

How children are linked

A subform points to the child template itself, not to a fixed version. Publishing a new version of the child template applies to new children, while existing children keep the version they were filed under.

The subform itself belongs to the parent form's version. To add or change one on a published form, click Create new version: the change shows on parent records created after you publish that version, while records already filed keep the sections they started with. A child is always filed on its parent's project. A child can have subforms of its own, up to four levels in total counting the top record, and a section with Allow more than one turned off won't accept a second child.

The agent can do it too

Ask the agent to raise a child ("open a corrective action under this NCR") and it creates the linked record, fills in what you described, and leaves it for you to review. It can only raise children where the template has a subform for them. If you have the Build & edit templates permission, it can also add the subform to a form you're building ("add corrective actions as a subform, required when the result is Fail"), once the child form is published.