Skip to content

app.form_templates

TableRow level security on

A no-code form (Section 4.9 Forms) with conditional fields, photos, GPS stamp, signature, scoring and approval routing. Submissions on a project become records of its canon kind and subtype.

Primary key: id

Columns of app.form_templates
ColumnTypeNullableDescription
iduuidNoPrimary key, UUID v7.
org_iduuidNoOwning org. A row never moves to another org.References app.organizations.id
nametextNoForm name, unique in the org.
descriptiontextYesWhat the form is for and when to fill it in.
record_kindtextNoCanon record kind each project submission becomes.References xpms.dim_record_subtype.record_kind
record_subtypetextYesCanon record subtype of those records.References xpms.dim_record_subtype.record_subtype
fieldsjsonbNoField definitions: key, label, kind, required, choices, points and show_if.
requires_signaturebooleanNoWhether a submission must be signed.
requires_locationbooleanNoWhether a submission must carry a GPS stamp.
pass_scorenumericYesScore a submission needs to pass; NULL when the form is not scored to pass.
approver_role_iduuidYesOrg role whose holders approve submissions; NULL files them as Recorded.References app.roles.id
template_stateapp.form_template_stateNoDraft, Published or Retired.
current_versionintegerNoLatest published version number; 0 before the first publish.
created_attimestamp with time zoneNoWhen the row was inserted. Set by the database.
created_byuuidYesPerson who inserted the row, or null for a platform process. Set by the database.References app.people.id
updated_attimestamp with time zoneNoWhen the row last changed. Set by the database.
updated_byuuidYesPerson who last changed the row, or null for a platform process. Set by the database.References app.people.id
deleted_attimestamp with time zoneYesSoft delete time. A row with deleted_at set is ignored by every access helper.