This article uses the Performance Management module as an example to demonstrate how to build a hierarchical goal structure -- such as primary, secondary, and tertiary performance goals -- within a single table by using a self-referential relationship. This structure enables you to organize and manage goals top-down, including viewing details of sub-goals and aggregating progress data across subordinate goals.
How to Design It?
1. Self-reference: Use a Lookup field that relates to the current form (Performance Goals) to establish parent-child relationships between goals.
2. Automatic sub-goal tab: Once the self-reference is created, a related tab will be added to the record details view, allowing users to view and manage all direct sub-goals.
3. Real-time aggregation: Use aggregation fields to summarize sub-goal metrics, such as current sales figures, collection amounts, or overall task progress.
What Does It Look Like?
Building Hierarchies
The hierarchical structure is created incrementally by linking adjacent goal levels. For example, a primary goal such as “$500,000 in annual sales” is created first. And a secondary goal like “$150,000 in Q1 sales” is then created and linked to the primary goal using the Lookup field.
This step-by-step linking eventually forms a tree-like structure of performance objectives.
Data Viewing and Managing
Once the relationship is established, you can click the Lookup field to view the parent goal or use the related tab to drill down to sub-goals.
For example, from a secondary goal, you can jump to the primary goal, and from there, access and manage all directly related secondary goals through the tab.
Aggregating Sub-Goal Progress
Real-time progress can be displayed using an aggregation field. For instance, when the sub-goal “Q1 Sales” is updated to $180,000, the parent goal’s data will automatically be updated.
How to Configure It?
Step 1 Preparing the Form
In this case, a single table, Performance Goals, is needed, where all levels of performance targets are entered.
Step 2 Configuring the Lookup Field
To enable two-way navigation between parent and child goals, we go to the form design page, click the Lookup field, and relate it to the current form.
In Field Configuration, you can set:
FIelds to be displayed: Target Name, Target Value, Owner, Start Time, End Time
Data Sorting Rule: Updated Time (Descending)
Operations on the Master Form: Add records to the master form
Once configured, the detail page will automatically display two related tabs: Basic Information and Performance Goals.
For clarity, you can rename the tabs. We go to Extension > Data Details > Settings, rename the tabs to Current Goal and Sub-Goals respectively.
Step 3 Setting up Aggregation Fields
Through the Aggregation field, we can calculate the total progress of sub-goals. We add an Aggregation field and rename it to Sub-goals Completion Value.
Go to the Formula Settings page, click the Goal Completion Value, and set the aggregation method to SUM.
Finally, click OK and save the form.