---
category: [Administration & Integrations, Platform and Product Extensions, Platform and Product Extensions/Integration, Administration & Integrations/Custom Integrations & Apps, Platform and Product Extensions/Workday Extend]
keyword: [Extend, Presentation Components, widgets, tags, UI components]
nav: wcp_docs
parent_url: /wcp_docs/
title: dynamicColumns
layout: subsection
wd_wcptag: dynamicColumns
---

<a id="section_N10021_N1001E_N10001"></a>
Specifies column information about the dynamic columns in a grid.

Use `dynamicColumns` on view and edit pages.

Use `dynamicColumns` with the `cellTemplates[]` in the `grid` tag. All `dynamicColumns` attributes are required except for `id`, which is for debugging purposes.

`dynamicColumns` is a child tag of the `grid` tag. See "Defining Dynamic Columns" in [Concept: grid](/wcp_docs/tgx1652476064414.html).

## <a id="section_qb1_3wp_3jb"></a>Example

```
{
  "type": "grid",
  "id": "gridWithDynamicColumns",
  "label": "Grid with Dynamic Columns",
  "rowVariableName":"row",
  "rows": "<% workersEndpoint.data %>",
  "dynamicColumns" : {
    "type": "dynamicColumns",
    "columns": "<%  
     [ 
      {'name': 'Name',
       'id': 'descriptor',
       'type': 'string',
       'dataField': 'descriptor'},
      {'name': 'Email',
       'id': 'email',
       'type': 'string',
       'dataField': 'person.email'},
      {'name': 'Supervisory Organization',
       'id': 'supervisoryOrganization',
       'type': 'string',
       'dataField': 'primaryJob.supervisoryOrganization.descriptor'}
     ] 
    %>",
    "columnVariableName": "aColumn",
    "columnId": "<% aColumn.id %>",
    "label": "<% aColumn.name %>",
    "templateId": "<% aColumn.type %>",
    "attributeName": "<% aColumn.dataField %>"
  },
  "cellTemplates": [
    {
      "type": "cellTemplate",
      "templateId": "string",
      "template": {
        "type": "text"
      }
    }
  ]
}
```

## <a id="section_a1t_3lh_lhb"></a>Mobile Support

Android, iOS

## <a id="section_qpw_1kc_ccb"></a>Attributes

-   <b>attributeName</b>

    Data type: binding-String

    A binding to the attribute name that contains the endpoint field data to display.

-   <b>columnId</b>

    Data type: binding-String

    A binding to the column id for identifying the generated column. Use `columnId` (instead of `id`) to reference a column.

-   <b>columns</b>

    Data type: binding-List

    A binding to a list containing the column information used for generating dynamic columns.

-   <b>columnVariableName</b>

    Data type: string

    The variable name used to reference the column in the `dynamicColumns` tag.

-   <b>id</b>

    Data type: binding-String

    Unique identifier used for debugging purposes only.

    Notes:

    -   The `id` must start with a letter.
    -   The `id` must be unique per page.

-   <b>label</b>

    Data type: dynamicBinding-String

    A binding to the attribute containing the column title.

-   <b>templateId</b>

    Data type: binding-String

    A binding to the attribute that associates a type of column with a cell template. The column data specified in the `columns` attribute of `dynamicColumns` must contain the `templateId`. The values of the `templateId` attribute in the column data must each correspond to the `templateId` of a `cellTemplate` in `cellTemplates[]`.



