---
schema_version: "1"
id: c693f6ff267f7db08745fa2d69cd098d3187bbf6656f816ae9a1751ea1d18a9d
title: Dynamically Retrieve Data with Data Tables
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/siteforce_data_table.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.siteforce_data_table.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 12c4dc1fc7a6d9c2cdac77579af27f2ea5b203296caf76a79f01a3369dc639a7
description: 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.
products:
  - Salesforce Platform
  - Security
release: "264"
---
# 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

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

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

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

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:

1. Drag a **Data Table** 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 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 results returned. 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 **Next**.
8. Add available 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. Reorder the list of selected fields by clicking **Move Up** or **Move Down**.
10. Click **Save**.

![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 add page elements to a data table. However, you can add additional columns to a data table by selecting it and clicking **Edit**. On the Select Fields screen, select the additional fields and save your changes.

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.

#### See Also

- [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.")
- [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.")