Creating a Child Dataset
  • 11 Apr 2025
  • 2 minute read
  • Dark
    Light
  • PDF

Creating a Child Dataset

  • Dark
    Light
  • PDF

Article summary

Datasets can have a parent/child relationship, designating one record as dependent upon another. This allows for one-to-many type relationships between the parent (one) and child (many) records.

Example: Organizations and Organization Contacts

An standard example of a parent/child relationship 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.

Organization data can be queried using the organization contacts query base. For example, you could query for organization contact records that belong to organization records with a category of High School.

Datasets that you create can also be configured to have parent/child relationships. Examples might include community-based organizations (parent) and community-based organization contacts (child) or churches (parent) and church contacts (child).

Not seeing the Organizations and Organization Contacts datasets?

In Slate for Advancement databases, the Organizations dataset is replaced by the Educational Institutions dataset, and does not include a corresponding child dataset.

Creating a child dataset

This requires a custom dataset already exist to be the new dataset’s parent.

To create a child dataset:

  1. Go to Database → Datasets.

  2. Select Insert.

  3. From the Parent list, select an existing dataset that should be its parent.

📖 Further reading: Creating a Custom Dataset

Creating the related dataset row field

Parent and child datasets relate to one another using a field called a Related Dataset Row.

To create this field, follow the steps in Linking Datasets using Related Dataset Row Fields → Creating a Related Dataset Row Field.

For the Multiple setting, choose “Multiple values” instead of “Single value”.

On the Related Dataset setting, select the newly-created child dataset from the list.

Further Configurations

After following the instructions in this article, the dataset, related dataset row field, and query base for the child dataset will be configured.

To show the appropriate child dataset records on the dashboard of the parent record, consider creating 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.

📝 These steps are not necessary for most Slate users. If you have any doubts as to whether this is required for your use-case, consult the Community Forums.

Locating the dataset GUID

The GUID of the datasets can be found in DatabaseDatasets at the top of the dialog box for the appropriate datasets. The GUID of the query bases can be found in DatabaseQuery Bases at the top of the dialog box for the appropriate dataset query bases.

To create the child dataset’s query base:

  1. Go to DatabaseQuery Bases.

  2. Select Insert.

  3. 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.

  4. Select Save.


Was this article helpful?