Multi-Tenant Data with FileMaker Relationships
ExpertDesign a multi-tenant FileMaker solution where different organizations share the same database while keeping their data completely isolated.
What you'll learn
- How to add a TenantID to every table and enforce it via relationships
- How to use privilege set formulas for tenant isolation
- How to handle tenant-specific reference data
- Common multi-tenant pitfalls and how to prevent data leakage
Multi-tenancy means multiple organizations ("tenants") share one FileMaker file but can only see their own data. This is different from user-level row security -- here, the unit of isolation is the organization, not the individual. The relationship graph, privilege sets, and global fields must work together to enforce tenant boundaries at every access point.
TenantID on every data table
Add a TenantID field to every table that stores tenant-specific data. Auto-enter the current session's TenantID (from a global field set at login) so new records always belong to the correct tenant.
// Every data table: add TenantID field // Type: Number (or text UUID for external-facing tenants) // Options: auto-enter calculation: Globals::gCurrentTenantID // "Do not replace existing value" = ON (don't overwrite existing records) // Tables needing TenantID: Contacts, Accounts, Invoices, Tasks, etc. // Tables NOT needing TenantID: shared reference data (Countries, TaxRates) // At login script: // Perform Find [ TenantUsers::AccountName = Get(AccountName) ] // Set Field [ Globals::gCurrentTenantID ; TenantUsers::TenantID ]
Sign in to track your progress and pick up where you left off.
Sign in to FM Dojo