Choosing the right table occurrence for a layout
ExpertSelect the appropriate table occurrence (TO) for each layout to minimize relationship traversal and ensure the correct record context.
What you'll learn
- How the layout's base TO determines which record is current
- Why related fields across multiple hops are slower than local fields
- How to choose the correct TO to minimize hops to primary data
Every FileMaker layout is based on a single table occurrence. All fields placed on the layout are accessed relative to that TO, and the current record displayed is a record in that TO's base table. Choosing the wrong TO for a layout causes extra relationship hops, confusion about the current record, and subtle bugs in scripts that use Get(RecordID).
The current record is always in the layout's base TO
Get(RecordID), Get(FoundCount), and Perform Find all operate on the layout's base TO. If your layout is based on TO "INVOICES" and you show a client name from CLIENTS, the current record is an Invoice — navigating to "the related client" means using GTRR.
// Layout based on: INVOICES // Get(RecordID) → Invoice record ID // Get(FoundCount) → count of Invoices in found set // Perform Find → finds Invoice records // Layout based on: CLIENTS // Same fields, but now current record is a Client // Get(RecordID) → Client record ID // Perform Find → finds Client records
Sign in to track your progress and pick up where you left off.
Sign in to FM Dojo