Portal Community

The Formula

// Tenant private FormID range for a specific group:
// rangeStart = tenantId × 100000 + groupRangeStart
// rangeEnd   = rangeStart + 99

// Example: Tenant 9, GuardRails group (groupRangeStart = 13000)
rangeStart = 9 × 100000 + 13000 = 913000
rangeEnd   = 913000 + 99        = 913099

// FormIDs 913000–913099 are private to Tenant 9 in the GuardRails group

Examples

TenantIDGroupGroup StartTenant Range StartTenant Range End
9GuardRails13000913000913099
9NodePolicies14000914000914099
12GuardRails1300012130001213099
42WorkDesk1500042150004215099
100GuardRails130001001300010013099

Why This Formula?

The formula creates a namespace that is:

Computing the Range in Code

function tenantGroupRange(tenantId: number, groupRangeStart: number): { start: number; end: number } {
  const start = tenantId * 100000 + groupRangeStart;
  return { start, end: start + 99 };
}

// Examples
tenantGroupRange(9,  13000)  // → { start: 913000,   end: 913099 }
tenantGroupRange(12, 13000)  // → { start: 1213000,  end: 1213099 }
tenantGroupRange(9,  14000)  // → { start: 914000,   end: 914099 }

Tenant FormID in the Atlas_Forms Row

-- Tenant addition row: FormID is in the tenant range, TenantID is set
INSERT INTO [dbo].[Atlas_Forms]
    ([FormID], [FormCode], [FormCategoryID], [FormTypeID],
     [PrimaryUsage], [NodeUsage], [TenantID], [IsActive], [SchemaJson])
VALUES
    (913001, 'Acme_GuardRail_GdprConsent_Edit', 130, 2,
     'guardrails', 'acme-guardrail-gdpr-consent', 9, 1, N'{...}');

-- The FormCategoryID (130) remains the same — this form belongs to the GuardRails group
-- The TenantID (9) marks it as a private tenant form
Tenant FormIDs Are Never Global A FormID of 913001 with TenantID = 9 is only accessible when a request is made in the context of Tenant 9. The form loader always filters by TenantID, so there is no risk of Tenant 9's private forms appearing in Tenant 12's session.