Self-join relationships and hierarchical data

Expert

Create a table occurrence of the same table to build organizational charts, parent-child hierarchies, and next/previous record navigation.

What you'll learn

  • How to create a self-join by adding a second occurrence of the same table
  • How to build a parent-child hierarchy with a self-join
  • How to use a self-join for next/previous record navigation

A self-join is a relationship where both sides point to the same base table, using different table occurrence names. Self-joins enable parent-child hierarchies, peer relationships (showing siblings), next/previous record navigation, and same-table aggregates filtered by a related field.

1/3
1

Creating a self-join table occurrence

In the Relationships Graph, drag the same table a second time to create a new table occurrence (e.g., "Employees_Reports"). Define the relationship between the two occurrences.

FileMaker Script
// Organizational hierarchy self-join:
// TO 1: Employees (anchor — current manager)
// TO 2: Employees_Reports (direct reports)
// Relationship: Employees::id = Employees_Reports::ManagerId

// In a portal showing Employees_Reports, you see
// all employees who report to the current Employees record.

Sign in to track your progress and pick up where you left off.

Sign in to FM Dojo