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.
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 |
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.
To add a data table to the page:
- Drag a Data Table 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 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 results returned. 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 Next.
-
Add available fields to the table by double-clicking a field, or selecting it
and clicking
.
- Reorder the list of selected fields by clicking Move Up or Move Down.
- Click Save.
After you've added the data table to the page, you can use the Properties pane to:
- Provide a short heading or summary of the table's purpose in the Caption field. The caption appears above the table, and complies with W3C accessibility standards for screen reader users.
- Hide the column headings by deselecting Show Column Headings in the Table section.
- Make the columns sortable by selecting the jQuery Flexigrid theme in the Theme section and selecting Enable Sorting. The theme also changes the appearance of the table.
- Change the name of a column by selecting the column cell and updating its name in the Column Heading property in the Data Table section.

