---
schema_version: "1"
id: efc191a61d05fbc288039ef4a2f0db9269cb71022e9b2e026f2dc1d01caf36bd
title: Displaying Data from Related Objects Using Nested Data Repeaters
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/siteforce_data_nested_add.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.siteforce_data_nested_add.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 1b9117be90533caa513d2fd65651c306f4d4beaaca9821bb03d2e84f0413f126
description: You can retrieve data from any child object of a parent object using a data repeater that contains another data repeater, data table, or data function.
products:
  - Salesforce Platform
  - Security
release: "264"
---
# Displaying Data from Related Objects Using Nested Data Repeaters

You can retrieve data from any child object of a parent object using a data repeater that contains another data repeater, data table, or data function.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition">
        <colgroup>
          <col>
        </colgroup>
        <tbody>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">Available in: Salesforce Classic</td>

          </tr>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">
              <p>Available for purchase in: <strong>Enterprise</strong>, <strong>Performance</strong>,
                and <strong>Unlimited</strong> Editions</p>
              <p style="margin-bottom:0;">Available (with limitations) in:
                <strong>Developer</strong> Edition
              </p>
            </td>

          </tr>
        </tbody>
      </table> <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d82845e74">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d82845e74 ">To build, edit, and manage Site.com
              sites:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d82845e74 ">
              <p><samp class="parmname">Site.com Publisher
                  User</samp> field enabled on the user detail
                page</p>
              <p>AND</p>
              <p style="margin-bottom:0;">Site administrator or designer
                role assigned at the site level</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d82845e74 ">To edit the guest user profile:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d82845e74 ">
              <p><samp class="parmname">Site.com Publisher
                  User</samp> field enabled on the user detail
                page</p>
              <p>AND</p>
              <p>Site administrator or designer
                role assigned at the site
                level</p>
              <p>AND</p>
              <p>Manage Profiles and
                Permission Sets</p>
              <p>AND</p>
              <p style="margin-bottom:0;">Customize
                Application</p>
            </td>

          </tr>
        </tbody>
      </table>

The outer or parent data repeater connects to an object, such as Accounts. In turn, the inner data repeater, data table, or data function automatically lets you connect to any child objects, such as Contacts. This is also known as a nested data repeater. For example, if a data repeater is connected to Accounts, you can add a nested data function to it that's connected to Contacts to return the number of contacts associated with each account.

To create a nested data repeater:

1. [Add a data repeater](https://help.salesforce.com/s/articleView?id=platform.siteforce_data_repeater.htm&release=264.0.0&type=5 "Use a data repeater to connect to a standard or custom Salesforce object and retrieve a dataset based on the filter criteria that you specify.") to the page.
2. Drag another **Data Repeater**, **Data Table**, or **Data Function** from the Page Elements pane onto the data repeater.
3. Select the related Salesforce object that you want to connect to.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_note.png)
    
    Note You can also retrieve data from unrelated objects. However, as this can adversely affect the performance of your site, we recommend retrieving data from related objects only.
4. Optionally, in Filters, select criteria to filter your data set. If you don't select any criteria, all the data from the item is returned.
    
    1. Select the field to which the filter criteria apply. The Field drop-down list displays the object's fields, followed by the fields of all parent objects, which use the format parent\_object\_name.field\_name.
    2. Select [the operator](https://help.salesforce.com/s/articleView?id=platform.siteforce_data_operators.htm&release=264.0.0&type=5) to control how results are filtered. For example, select Equals to return an exact match.
    3. Select [the source](https://help.salesforce.com/s/articleView?id=platform.siteforce_data_operators.htm&release=264.0.0&type=5) of the filter value. For example, to specify an explicit value, select Fixed value, or to use the values passed to the page via a query string, select URL query string.
    4. Set the value of the filter. If you're using a query string, you can also specify what should happen if the query string is missing.
    5. Add additional filter criteria as required to narrow your results further. Each filter item is combined with an AND operator.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_note.png)
    
    Note If you're using a fixed value to filter the results, you can view the returned records in the Connection Preview section. To refresh the list of records, click **Reload Preview**.
5. In Sorting, you can specify whether to sort the results by one or more fields in ascending or descending order. For example, if you're working with an object that contains user data, you could sort your results by gender first and then by name.
6. In Limits, you can limit the number of returned results. For example, if you're only interested in the top five results, enter 5 in the Limit results to field.
7. If you're adding [pagination](https://help.salesforce.com/s/articleView?id=platform.siteforce_events_pagination.htm&release=264.0.0&type=5 "Events let you add interactive and animated effects to the pages and page elements of your website. When using data repeaters and data tables, you can add pagination events so users can easily page through the displayed data. Pagination events are particularly useful when working with large amounts of data."), specify the number of results to display per page in the Results per page field.
8. If you're working with a data table, click **Next** and add fields to the table by double-clicking a field, or selecting it and clicking ![Add](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/extend_click/images/siteforce_icon_moveright.png).
9. Click **Save**.

You can either add [data elements](https://help.salesforce.com/s/articleView?id=platform.siteforce_data_repeater_element.htm&release=264.0.0&type=5 "You can use a data element to display the data retrieved by a page data connection or a data repeater. The data element binds to a field in the object and acts as a placeholder that's replaced with the field's data when the page loads.") or [custom code](https://help.salesforce.com/s/articleView?id=platform.siteforce_data_code.htm&release=264.0.0&type=5 "In addition to data elements and content blocks, you can also use custom code as an alternative way to display data in a data repeater or in a page data connection. It's particularly useful for displaying field data that's inline with text.") to the parent repeater to display its fields. Similarly, if you've nested a data repeater inside the parent data repeater, add data elements or custom code to the nested data repeater to display the child object's fields.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_note.png)

Note You can't nest data repeaters more than one level deep.

#### See Also

- [Access Data in Related Objects Overview](https://help.salesforce.com/s/articleView?id=platform.siteforce_data_nested_overview.htm&release=264.0.0&type=5 "Standard and custom objects have relationships that define how records in one object relate to records in another. For example, the Accounts object has a one-to-many relationship with the Contacts object—that is, each account can have one or more contacts associated with it. This relationship is also known as a parent-to-child or a master-detail relationship.")
- [Dynamically Retrieve Data with Data Tables](https://help.salesforce.com/s/articleView?id=platform.siteforce_data_table.htm&release=264.0.0&type=5 "Use a data table to connect to a standard or custom Salesforce object, retrieve a dataset based on the filter criteria that you specify, and display one or more record as rows in the table.")
- [Using Data Functions](https://help.salesforce.com/s/articleView?id=platform.siteforce_data_function.htm&release=264.0.0&type=5 "A data function lets you connect to a standard or custom Salesforce object, perform calculations on the returned results, and display the calculation on the page. For example, for a particular field in an object, you can use a data function to calculate the total value or the average amount of all returned records.")