Define fields for the CDT table
  • 03 May 2024
  • 3 Minutes to read
  • Dark
    Light

Define fields for the CDT table

  • Dark
    Light

Article summary

Define the fields that will appear in the Configurable Data Table (CDT) Lightning component(s) that use the defined data table configuration.

To define fields that will display in the CDT component

  1. From the App Launcher, select Data Table Configurations, then select the configuration you defined.
  2. Go to the Related tab. In the Fields Configuration section, select New.
  3. In the New Data Table Field Configuration dialog, enter information or make selections:
    1. Field Configuration Name—Enter a descriptive name for the configuration.
    2. Data Table Configuration—Enter the Data Table Configuration Name that you defined.
    3. Field Name—Enter the API name of a field from the sObjectName that you defined. For example, AccountNumber for a standard Salesforce field, or zpf__SLAExpirationDate__c for a custom field.
    4. Field Label Override—Enter a string value that overrides any existing field label translation.
    5. Visible—Select this checkbox to make the field visible in the rendered rows of the CDT Lightning component.
    6. Field Width—Enter the desired width of the field in the data table (must be > 0). This applies only to the Fit to Page mode.
    7. Field Order—Enter the order (starting with 1, from left to right) in which the defined fields are rendered as columns in the CDT component.
    8. Default Sort—From this dropdown, choose whether or not the rendered column will be sorted.
    9. Multi-Level Sort Order—Enter the desired multi-column sort order (starting with 0, from first to n sort order). Leave this value blank for fields that aren't part of the desired sort order.
  4. Select Save.

To define filters for fields to be displayed by the CDT component

Define filters to limit the records displayed in the rendered output of the CDT Lightning component. You can configure a set of static field filters and/or apply a custom filtering logic by defining a custom APEX hook.

To configure static filters

  1. From the App Launcher, select Data Table Configurations, then select the configuration you defined.
  2. Go to the Related tab. In the Filters Configuration section, select New.
  3. In the New Data Table Filter Configuration, enter information or make selections:
    1. Field Filter Name—Enter a descriptive name for the filter.
    2. Data Table Configuration—Enter the Data Table Configuration Name that you defined.
    3. Field Name—Enter the API name of a field from the sObjectName that you defined. For example, AccountNumber for a standard Salesforce field, or zpf__SLAExpirationDate__c for a custom field.
    4. Operator—From this dropdown, choose the comparison operator for your filter value.
    5. Value—Enter the filter value.
  4. Select Save.

The following image displays an example of the static filter configuration:

CDT_Static filter config

To configure filters by using APEX hook

Use the APEX hook when your desired business logic for filter field comparisons cannot be applied by using Salesforce formula fields and dialog filters. This hook occurs before records are loaded into the CDT view on a user’s screen. The products are first processed by the custom logic in the hook, and are then loaded into the user's view.

For more information on the hook, read CDT Scoped Records Filterer Class.

You can combine both static filters and custom APEX hook. If you do this, the results of both approaches must evaluate as TRUE on any given product to display it in the Configurable Data Table view.

Supported Field Data Types

The field data types that are not listed in this table will be treated as text, and therefore may not display properly in the CDT component. For example, the Geolocation data type will be displayed as an empty field in the rendered output of the component.

Supported Field Data TypesCorrect Value Format
Checkbox (Boolean)For example, true/false, TRUE/FALSE, 1/0, True/False, tRUE/fALSE(any letter case)
CurrencyCurrency symbol (with localization formatting)
DateYYYY-MM-DD (with localization formatting)
DateTimeYYYY-MM-DDThh:mm:ss+hh:mm YYYY-MM-DDThh:mm:ss-hh:mm YYYY-MM-DDThh:mm:ssZ (with localization formatting)
EmailText value (without hyperlink)
Formula
  • Return Type: Checkbox, Currency, Date, DateTime, Number, Percent, Text
  • Time is not supported
  • A formula with the Text return type and IMAGE() function displays an image. For example: <img src="/logos/Custom/Flag_Primary/logo.png" alt="Flag"style="height:20px; width:20px" border="0"/> Icon Test
IdAs a hyperlink or as a label
LookupObject Ids are displayed as object names with a link to that object
NameField value displayed as a label
NumberDecimal numbers. For example, 10, 10.0
PercentFor example, 0.11 as 11%
Phone numberText value (without hyperlink)
PicklistText value (without quotation marks). Can include numbers and special characters
TextText value (without quotation marks). Can include numbers and special characters
Text AreaText value (without quotation marks). Can include numbers and special characters
URLAs a hyperlink

Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.