- 01 Jul 2025
- 7 minute read
- Print
- DarkLight
- PDF
Creating a Parent/Child Dataset Relationship
- Updated 01 Jul 2025
- 7 minute read
- Print
- DarkLight
- PDF
Datasets can have a parent/child relationship, in which the child dataset’s records are dependent upon the parent’s.
This lets you establish one-to-many relationships between the parent record (one) and child records (many), which helps when querying interrelated data.
Example: Organizations and Organization Contacts
An example of a parent/child relationship already in Admissions and Student Success databases is the Organizations dataset (the parent) and Organization Contacts dataset (its child). An organization contact record represents an employee or representative of the parent organization.
The Slate for Advancement equivalent to the Organizations dataset is called Educational Institutions and does not include a corresponding child dataset.
A parent/child relationship creates the opportunity for convenient joins. Organization data can be queried using the organization contacts query base, and vice-versa. For example, you can create a query on organization contact records that belong to organization records with a category of High School.
Other examples
Slate institutions have a variety of use-cases for parent and child datasets.
Common examples include:
Community-Based Organizations (parent) and Community-Based Organization Contacts (child)
Churches (parent) and Church Contacts (child)
Dormitories (parent) and Dorm Rooms (child)
Steps to create a parent/child relationship between datasets
Establishing a parent/child relationship between two datasets involves creating some connective tissue in the form of special fields.
There are four overarching steps to creating this relationship:
Create the child dataset, selecting the previously-created dataset as its parent.
Create a related dataset row field to relate the datasets to each other.
Link child dataset records with parent dataset records with a form or on the record’s Profile tab.
Step 1: Creating the parent dataset
Before you can create a child dataset, you must first create its parent dataset.
You can create a new dataset in Database → Datasets. For specific instructions, see step 1 of Creating a Custom Dataset.
While step 1 is technically all you need to do before proceeding with the remainder of this article, we recommend you see the article through to understand the scope of creating a custom dataset.
Step 2: Creating the child dataset
Creating the child dataset follows almost identical instructions to creating the parent dataset.
To designate any dataset as a child dataset, select the desired parent dataset when creating or modifying it in Database → Datasets.
Step 3: Relating parent and child datasets with a related dataset row field
Parent and child datasets are related to one another using a field type called a Related Dataset Row Field.
To create this field:
Select Database on the top navigation bar and select Fields.
Select New Field. A popup appears.
Configure the following settings:
Status: Active
Scope Category: Records
Scope: Select the name of your parent dataset from the list.
ID: Enter a computer-friendly ID for the field ID. Use an easily-identified prefix at the beginning of all custom dataset field IDs for easy recognition and sorting.
For example, a Churches dataset might have a prefix of
church_
, and a field linking it to Church Contacts might be calledchurch_contacts
.
Name: Enter a brief, descriptive name. This might be the name of the child dataset.
Folder: Keep custom dataset fields organized by selecting a folder, or select Other to create a new one.
💡 Place custom dataset fields in a single folder so they can be viewed simultaneously.
Category: Select or create a Category for your fields, if desired.
Field Type: Select Related Dataset Row.
Multiple: Choose Multiple values, as each parent record can have multiple child records.
Related Dataset: Select your child dataset.
Select Save.
Step 4: Linking the child records to their parent records
With the parent and child datasets associated with each other, we can now create child dataset records and associate them with their parent dataset.
There are two ways to designate a child dataset record as dependent on a parent dataset record:
On the child dataset’s new record form: Involves adding two new fields to the child dataset’s new record creation form.
From the child record: Users can also modify parent record affiliation after a child record has been created.
Option 1: From a new record creation form
This process has us recreating the functionality of the New Organization Contact form that appears in Slate for Admissions databases.
Among others, this form features two required fields, Organization Name and Organization Key: when the user enters a name in Organization Name, auto-suggest puts forward potential matches for existing organization records. When the user selects one of these records, the organization’s key is populated in the Organization Key field.
There are four steps we’ll take to recreate this functionality in a form of our own:
Create the new record creation form.
Copy the parent dataset’s globally-unique identifier (GUID).
Add a Parent Name field to the form.
Add a Parent Key field to the form.
Copy the parent dataset’s GUID
When setting up the new record creation form, we’ll need to reference the parent dataset’s GUID.
To find the parent dataset’s GUID:
Go to Database → Datasets.
Select a parent dataset from the list.
Copy the ID value.
Paste the ID in a location you can retrieve later.
Add a Parent Record Name field to the form
Next, we’ll create a text field in which the form submitter can enter the name of a parent dataset record.
We’ll configure auto-suggest to surface records from the parent dataset that match the name as the user types.
To create this field:
Go to your new record creation form.
Select Edit Form.
Add a Text Box.
Configure the following settings:
Label: Enter a descriptive name, like Parent Record Name.
System Field: Record → Parent Name (for record creation)
Auto-suggest: Select Other. In the text field that appears, enter
suggest,d:PARENT-GUID/name
, wherePARENT-GUID
is the GUID copied in the previous section.
Select Save.
Add a Parent Record Key field to the form
To connect the parent and child dataset records, we must capture the parent record’s GUID, or key. We’ll create a Parent Record Key field to capture this. When the user selects a parent dataset from the auto-suggest list, this new field will be populated with that record’s GUID.
As before, we can use auto-suggest to bring up matching keys as the user types, in the event we want users to be able to enter the GUID directly.
To create this field:
Add a Text Box.
Configure the following settings:
Label: Enter a descriptive name, like Parent Organization Key (hidden).
System Field: Record → Parent Key
Auto-suggest: Other → In the text field, enter
suggest,d:PARENT-GUID/key
, wherePARENT-GUID
is the GUID copied in the previous section.📝 Note: This field ends with
/key,
not/name
, as in the previous step.
Options: Since the value of this field is set automatically when the user selects a parent dataset name from the auto-suggest, you can optionally select Hidden or Read Only if you don’t expect users to manually enter dataset GUIDs.
Select Save.
When the user selects an auto-suggested parent dataset, the Parent Record Key field populates with that record’s GUID.
After these two fields have been added to the new record creation form, add any other data points you wish to capture about the child record (as described in the Custom Dataset New Record Form article).
Test the form to ensure it functions as intended.
Option 2: From the child record
You can set, clear, or update the parent record to which a child record belongs from the child record itself.
To change the child record’s parent record:
Navigate to the child record
Select Profile.
Select Account.
If a parent record is already assigned, select clear.
Enter the desired parent record’s name in the Parent Record text box.
Select Save.
View a list of child records on the parent record’s dashboard
You can display a list of related child dataset records on the dashboard of the parent record with an embedded dataset row query.
Legacy compatibility
For compatibility with legacy (Local/Slate Template Library) queries and tools that rely on them, you must add a custom query base.
💡Most Slate users won’t need to do this. Ask the Community Forums if you’re not sure whether this applies to you.
Locating the dataset GUID
The GUID of the datasets can be found in Database → Datasets at the top of the dialog box for the appropriate datasets, shown as ‘ID’. The GUID of the query bases can be found in Database → Query Bases at the top of the dialog box for the appropriate dataset query bases.
To create the child dataset’s query base:
Go to Database → Query Bases.
Select Insert.
Enter the following User configurations in the dialog box:
Status: Active
Order: Enter an order value lower than that of the parent dataset query base.
Key:
d_contact.[id]
Enable Lookup: Yes
Enable Query: Yes
Enable Reader: No
Related Bases: Copy the GUID of the parent dataset query base and paste it into this box, surrounded by tags.
From Clause:
[dataset.row] d_contact
Join Clause:
left outer join [field] d_contact_rel on (d_contact_rel.[related] = d_contact.[id]) and (d_contact_rel.[field] = 'ID OF RELATED DATASET ROW FIELD') left outer join [dataset.row] d on (d.[id] = d_contact_rel.[record]) and (d.[dataset] = 'GUID OF THE PARENT DATASET')
Where Clause:
(d_contact.[dataset] = 'GUID OF CHILD DATASET')
Read Permission: Set the read permission as desired.
Dataset: Select the child dataset from the list.
Select Save.