Atlas Forms
Database Backing
Every Atlas Forms form is a row in the dbo.Atlas_Forms table. The group membership, type, and routing behaviour of each form are encoded in four columns: FormCategoryID, FormTypeID, PrimaryUsage, and NodeUsage.
Atlas_Forms Table — Key Columns
-- dbo.Atlas_Forms (key columns for group behaviour)
CREATE TABLE [dbo].[Atlas_Forms] (
[FormID] INT NOT NULL, -- Primary key; unique across all groups
[FormCode] NVARCHAR(100) NOT NULL, -- Human-readable identifier (e.g., 'GuardRail_Edit')
[FormCategoryID] INT NOT NULL, -- Foreign key → dbo.Atlas_FormCategories
[FormTypeID] INT NOT NULL, -- 1=List, 2=Property, 3=Wizard, 4=Dashboard
[PrimaryUsage] NVARCHAR(50) NOT NULL, -- Module tab routing key
[NodeUsage] NVARCHAR(50) NULL, -- Workflow node dispatch key (optional)
[TenantID] INT NULL, -- NULL = base form; non-NULL = tenant override row
[IsActive] BIT NOT NULL DEFAULT 1,
[SchemaJson] NVARCHAR(MAX) NOT NULL, -- Full form JSON schema
CONSTRAINT [PK_Atlas_Forms] PRIMARY KEY ([FormID])
);
Atlas_FormCategories Table
-- dbo.Atlas_FormCategories — one row per Form Group
CREATE TABLE [dbo].[Atlas_FormCategories] (
[FormCategoryID] INT NOT NULL, -- Primary key; = rangeStart / 100
[CategoryName] NVARCHAR(100) NOT NULL, -- e.g., 'GuardRails', 'NodePolicies'
[OwnerApp] NVARCHAR(100) NOT NULL, -- e.g., 'BizFirst.Ai.ProcessSecurity'
[FormIdRangeStart] INT NOT NULL, -- Inclusive range start (e.g., 13000)
[FormIdRangeEnd] INT NOT NULL, -- Inclusive range end (e.g., 13099)
[AiGenerationEnabled] BIT NOT NULL DEFAULT 0,
[TenantOverrideable] BIT NOT NULL DEFAULT 1,
CONSTRAINT [PK_Atlas_FormCategories] PRIMARY KEY ([FormCategoryID])
);
Column Reference
| Column | Type | Purpose |
|---|---|---|
FormCategoryID | INT | Links the form to its group; equals rangeStart / 100 |
FormTypeID | INT | 1 = List form (index), 2 = Property form (detail), 3 = Wizard, 4 = Dashboard |
PrimaryUsage | NVARCHAR(50) | Module tab key — the router uses this to map a form to the right tab without explicit route config |
NodeUsage | NVARCHAR(50) | Workflow node dispatch key — a FlowStudio node looks up the form by this key to present as an interaction |
TenantID | INT NULL | NULL for base forms; non-NULL for tenant-specific overrides of an existing FormID |
FormCode | NVARCHAR(100) | Stable string identifier used in matrix dispatch and AI generation pattern matching |
FormTypeID Values
| FormTypeID | Name | Role |
|---|---|---|
| 1 | List | Grid/table view of all items in the group; first form created for a new group |
| 2 | Property | Detail/edit form for a single item; the majority of forms are this type |
| 3 | Wizard | Multi-step form spanning several screens |
| 4 | Dashboard | Read-only metrics and chart display |
Query: All Forms in a Group
-- Retrieve all active forms in the GuardRails group (FormCategoryID = 130)
SELECT
f.FormID,
f.FormCode,
f.FormTypeID,
f.PrimaryUsage,
f.NodeUsage,
f.TenantID
FROM dbo.Atlas_Forms f
WHERE
f.FormCategoryID = 130
AND f.IsActive = 1
ORDER BY f.FormID;
TenantID = NULL Means Base Form
A row with
TenantID IS NULL is the base form that all tenants share. A row with a specific TenantID is a tenant override that the form-loading query merges on top of the base schema for that tenant. The application queries for both and the tenant row wins on any overlapping fields.