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
| Column | Type | Nullable | Description |
|---|---|---|---|
| id | uuid | No | Primary key, UUID v7. |
| org_id | uuid | No | Owning org. A row never moves to another org.References app.organizations.id |
| name | text | No | Form name, unique in the org. |
| description | text | Yes | What the form is for and when to fill it in. |
| record_kind | text | No | Canon record kind each project submission becomes.References xpms.dim_record_subtype.record_kind |
| record_subtype | text | Yes | Canon record subtype of those records.References xpms.dim_record_subtype.record_subtype |
| fields | jsonb | No | Field definitions: key, label, kind, required, choices, points and show_if. |
| requires_signature | boolean | No | Whether a submission must be signed. |
| requires_location | boolean | No | Whether a submission must carry a GPS stamp. |
| pass_score | numeric | Yes | Score a submission needs to pass; NULL when the form is not scored to pass. |
| approver_role_id | uuid | Yes | Org role whose holders approve submissions; NULL files them as Recorded.References app.roles.id |
| template_state | app.form_template_state | No | Draft, Published or Retired. |
| current_version | integer | No | Latest published version number; 0 before the first publish. |
| created_at | timestamp with time zone | No | When the row was inserted. Set by the database. |
| created_by | uuid | Yes | Person who inserted the row, or null for a platform process. Set by the database.References app.people.id |
| updated_at | timestamp with time zone | No | When the row last changed. Set by the database. |
| updated_by | uuid | Yes | Person who last changed the row, or null for a platform process. Set by the database.References app.people.id |
| deleted_at | timestamp with time zone | Yes | Soft delete time. A row with deleted_at set is ignored by every access helper. |