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
| Available in: Salesforce Classic |
|
Available for purchase in: Enterprise, Performance, and Unlimited Editions Available (with limitations) in: Developer Edition |
| User Permissions Needed | |
|---|---|
| To build, edit, and manage Site.com sites: |
Site.com Publisher User field enabled on the user detail page AND Site administrator or designer role assigned at the site level |
| To edit the guest user profile: |
Site.com Publisher User field enabled on the user detail page AND Site administrator or designer role assigned at the site level AND Manage Profiles and Permission Sets AND Customize Application |
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:
- Drag a Data Repeater from the Page Elements pane onto the page.
-
Select the object that you want to
connect to.
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, 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.
-
Optionally, in Filters, select criteria to filter your dataset.
If you don't select any criteria, all the data from the item
is returned.
- 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.
- Select the operator to control how results are filtered. For example, select Equals to return an exact match.
- Select the source 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.
- 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.
- Add additional filter criteria as required to narrow your results further. Each filter item is combined with an AND operator.
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. - 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.
- 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.
- If you're adding pagination, specify the number of results to display per page in the Results per page field.
- Click Save.
Next, you must add either data elements, custom code, or content blocks to the data repeater to display the data it retrieves.
- Display Data or Content Using Data Elements
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.