--- title: "Define fields for CDT table" slug: "define-fields-for-cdt-table" description: "Read how to define the fields that appear in the Configurable Data Table (CDT) Lightning component that use the defined data table configuration." updated: 2024-05-03T06:21:54Z published: 2024-05-03T06:21:54Z canonical: "docs.zilliant.com/define-fields-for-cdt-table" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.zilliant.com/llms.txt > Use this file to discover all available pages before exploring further. # Define fields for the CDT table 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](/v1/docs/define-cdt-configuration). 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](https://cdn.document360.io/24f960e8-3c1c-4c18-a2c6-83b6ae4aab84/Images/Documentation/CDT_Static%20filter%20config.png?sv=2026-02-06&spr=https&st=2026-11-04T19%3A17%3A22Z&se=2026-11-04T20%3A17%3A22Z&sr=c&sp=r&sig=r1RqBD1iDUtV%2FmJkt2njhyEzsP5zPsLUA1jizfWDCpc%3D) ### 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](/v1/docs/cdtscopedrecordsfilterer). 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 Types | Correct Value Format | | --- | --- | | Checkbox (Boolean) | For example, true/false, TRUE/FALSE, 1/0, True/False, tRUE/fALSE(any letter case) | | Currency | Currency symbol (with localization formatting) | | Date | YYYY-MM-DD (with localization formatting) | | DateTime | YYYY-MM-DDThh:mm:ss+hh:mm YYYY-MM-DDThh:mm:ss-hh:mm YYYY-MM-DDThh:mm:ssZ (with localization formatting) | | Email | Text 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` | | Id | As a hyperlink or as a label | | Lookup | Object Ids are displayed as object names with a link to that object | | Name | Field value displayed as a label | | Number | Decimal numbers. For example, 10, 10.0 | | Percent | For example, 0.11 as 11% | | Phone number | Text value (without hyperlink) | | Picklist | Text value (without quotation marks). Can include numbers and special characters | | Text | Text value (without quotation marks). Can include numbers and special characters | | Text Area | Text value (without quotation marks). Can include numbers and special characters | | URL | As a hyperlink | ![apps_60](https://cdn.document360.io/24f960e8-3c1c-4c18-a2c6-83b6ae4aab84/Images/Documentation/apps_60.png?sv=2026-02-06&spr=https&st=2026-11-04T19%3A17%3A22Z&se=2026-11-04T20%3A17%3A22Z&sr=c&sp=r&sig=r1RqBD1iDUtV%2FmJkt2njhyEzsP5zPsLUA1jizfWDCpc%3D) App Launcher