---
schema_version: "1"
id: 5a51f7dca2ce085c87c12936aa721ff48edca0625940803fbfc279e83022dac5
title: Dynamically Retrieve Data with 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_repeater.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.siteforce_data_repeater.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 4aba32e6e42adc321fef32cb8b1e36dc7d2332577ad22515eff4a8223a9f8c2f
description: 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.
products:
  - Salesforce Platform
  - Security
release: "264"
---
# Dynamically Retrieve Data with Data Repeaters

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.

### 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="d219978e74">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d219978e74 ">To build, edit, and manage Site.com
              sites:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d219978e74 ">
              <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="d219978e74 ">To edit the guest user profile:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d219978e74 ">
              <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>

You can connect to standard or custom Salesforce objects, or to content lists or categories in your site. When you combine a data repeater with data elements, custom code, or content blocks, you can create a “repeating template” that displays one or more records on the page.

To add a data repeater to a page:

1. Drag a **Data Repeater** from the Page Elements pane onto the page.
2. Select the 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
    
    - For Site.com users, the dropdown list only displays objects that are available to guest users because site visitors access your public site via the Guest User license. To make other objects available, go to the [guest user profile](https://help.salesforce.com/s/articleView?id=platform.siteforce_data_access_perms.htm&release=264.0.0&type=5 "Sites built with Site.com are publicly available, so visitors access the site via the Guest User license that's associated with the site."), enable the relevant object's “Read” permission, and refresh the list.
    - For Communities users, the dropdown list displays objects that aren’t always available to site visitors. For authenticated visitors, object access on public and private pages is controlled by their user profiles. For unauthenticated visitors, object access on public pages is controlled by the site's guest user profile.
3. Optionally, in Filters, select criteria to filter your dataset. 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 dropdown 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 happens 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**.
4. 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.
5. 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.
6. 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.
7. Click **Save**.

Next, you must add either [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."), [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."), or [content blocks](https://help.salesforce.com/s/articleView?id=platform.siteforce_data_content_block.htm&release=264.0.0&type=5 "In addition to data elements and custom code, you can also use content blocks 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 data repeater to display the data it retrieves.

- **[Display Data or Content Using 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.
- **[Displaying Data or Content Using 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.
- **[Displaying Data Using Content Blocks](https://help.salesforce.com/s/articleView?id=platform.siteforce_data_content_block.htm&release=264.0.0&type=5)**  
    In addition to data elements and custom code, you can also use content blocks 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.
- **[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.
- **[Edit Columns in a Data Table](https://help.salesforce.com/s/articleView?id=platform.siteforce_data_table_column.htm&release=264.0.0&type=5)**  
    A data table's columns bind to the fields of the object it's connected to. Each column cell acts as a placeholder that is replaced with the field's data when the page loads.
- **[Add Pagination to Data Repeaters and Data Tables](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.
- **[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.
- **[Page Data Connections Overview](https://help.salesforce.com/s/articleView?id=platform.siteforce_data_page_overview.htm&release=264.0.0&type=5)**  
    Page data connections make it easy for site administrators and designers to create a detail page for a single record when working with Salesforce objects.
- **[Retrieving Data with Page Data Connections](https://help.salesforce.com/s/articleView?id=platform.siteforce_data_page_connection.htm&release=264.0.0&type=5)**  
    Use a page data connection to create a detail page for a single record when working with Salesforce objects.
- **[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.
- **[Displaying Data from Related Objects Using Nested Data Repeaters](https://help.salesforce.com/s/articleView?id=platform.siteforce_data_nested_add.htm&release=264.0.0&type=5)**  
    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.
- **[Improve Performance Using Caching](https://help.salesforce.com/s/articleView?id=platform.siteforce_data_caching.htm&release=264.0.0&type=5)**  
    When working with data-bound page elements, such as data repeaters, data tables, and data functions, you can improve the performance and page rendering of your website using caching. Caching controls how often a page containing a data connection requests data from Salesforce.
- **[Data Filters](https://help.salesforce.com/s/articleView?id=platform.siteforce_data_operators.htm&release=264.0.0&type=5)**  
    When you add a data repeater, a data table, or a data function to a page, you don't have to limit the records it retrieves. However, if you're working with a Salesforce object that has thousands of records, you can limit the returned results using filter criteria.
- **[About Displaying Dynamic Data Using Expressions](https://help.salesforce.com/s/articleView?id=platform.siteforce_data_merge_fields.htm&release=264.0.0&type=5)**  
    Site.com uses expression language to display data dynamically. Expressions serve as placeholders for data that is replaced with information when the page loads. When working with data-bound page elements or custom widget properties, you can use expressions to customize how data is displayed on the page.
- **[Data Filter Examples](https://help.salesforce.com/s/articleView?id=platform.siteforce_data_repeater_examples.htm&release=264.0.0&type=5)**  
    When working with data repeaters, data tables, and data functions, you can filter the data you retrieve in many ways. In this topic, we explore two options— fixed values and URL query strings—to illustrate some common filtering techniques.

#### See Also

- [The Default, Error, and No Data Views](https://help.salesforce.com/s/articleView?id=platform.siteforce_data_views.htm&release=264.0.0&type=5 "When working with data repeaters, data tables, data functions, and forms, you can customize what your site visitors see if an error occurs when connecting to the data source.")
- [Improve Performance Using Caching](https://help.salesforce.com/s/articleView?id=platform.siteforce_data_caching.htm&release=264.0.0&type=5 "When working with data-bound page elements, such as data repeaters, data tables, and data functions, you can improve the performance and page rendering of your website using caching. Caching controls how often a page containing a data connection requests data from Salesforce.")
- [Data Filter Examples](https://help.salesforce.com/s/articleView?id=platform.siteforce_data_repeater_examples.htm&release=264.0.0&type=5 "When working with data repeaters, data tables, and data functions, you can filter the data you retrieve in many ways. In this topic, we explore two options— fixed values and URL query strings—to illustrate some common filtering techniques.")
- [Site.com Data Services Overview](https://help.salesforce.com/s/articleView?id=platform.siteforce_data_overview.htm&release=264.0.0&type=5 "Site.com data services combine many features that let you connect to standard and custom Salesforce objects. Retrieve data from your organization's objects and dynamically display it on your site pages, or alternatively, gather and submit data from your customers. And when you update data in your Salesforce object, the changes are reflected automatically on the live site—no site updates required!")