---
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: column
layout: subsection
wd_wcptag: column
---

<a id="section_N10021_N1001E_N10001"></a>
Represents a column in the grid.

Use `column` on view and edit pages.

For each column, define a `column` tag in the `columns[]` attribute of the `grid`. Note that although you can resize the columns in the grid UI, you can't configure the column widths in the PMD.

`column` is a child tag of the `grid` tag. For usage and examples, see [Concept: grid](/wcp_docs/tgx1652476064414.html).

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

```
{
  "type": "grid",
  "label": "Workers",
  "id": "simpleGrid",
  "rows": "<% workersCommonEndpoint.data %>",
  "rowVariableName": "workerRow",
  "columns": [
    {
      "type": "column",
      "columnId": "column1",
      "label": "Worker",
      "cellTemplate": {
        "type": "instanceList",
        "instanceList": [
          {
            "id": "<% workerRow.id %>",
            "descriptor": "<% workerRow.descriptor %>",
            "wid": "<% workerRow.id %>"
          }
        ]
      }
    },
    {
      "type": "column",
      "columnId": "column2",
      "label": "Manager/Contributor",
      "cellTemplate": {
        "type": "checkBox",
        "trueLabel": "Manager",
        "falseLabel": "Contributor",
        "value": "<% workerRow.isManager %>"
      }
    },
    {
      "type": "column",
      "columnId": "column3",
      "label": "Supervisory Organization",
      "cellTemplate": {
        "type": "text",
        "value": "<% workerRow.primarySupervisoryOrganization.descriptor %>"
      }
    }
  ]
}
```

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

Android, iOS

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

-   <b>cellTemplate</b>

    Data type: tag

    A PMD tag used as a template for all cells in the static column.

    See [column](/wcp_docs/awa1518457187337.html) and "Defining Columns" in [Concept: grid](/wcp_docs/tgx1652476064414.html).

-   <b>columnId</b>

    Data type: string

    Uniquely identifies a column in the grid. The `columnId` value must contain at least 1 alphabetic character.

    Use `columnId` (instead of `id`) to reference a specific column.

-   <b>excel</b>

    Data type: excel

    Contains customization properties for exporting the column to Microsoft Excel. The `excel` attribute applies only when the `excelExportEnabled` attribute of the `grid` is true.

    Use `excel` only on view pages.

    If you don't specify `excel`, we export the columns using the widget values. We export number and currency values as numbers, date values as dates, and all other values as strings in Excel. If the cell tag specifies any format properties, we apply the specified format. If the cell is an `image`, container tag such as `section` or `fieldSet`, or a tag whose exportable format is unknown, you must specify the `value` property.

    The `excel` attribute is a map that can contain these customization properties:

    -   <b>enabled</b>

        Data type: booleanScript

        If false, excludes the column from the export. The default is true.

    -   <b>value</b>

        Data type: objectScript

        A PMD script that returns the value to export.

        To override the default string format and apply Excel-specific formatting, set the `valueType` and `valueFormat` properties.

    -   <b>valueType</b>

        Data type: string

        The data type of the `value` property. Valid values:

        -   `boolean`
        -   `date`
        -   `number`
        -   `string` (default)

        If you specify `valueType`, you must specify `value` with a matching data type.

    -   <b>valueFormat</b>

        Data type: stringScript

        An Excel format to apply on the exported value. See the [Excel Number format codes](https://support.microsoft.com/en-us/office/number-format-codes-5026bbd6-04bc-48cd-bf33-80f18b4eae68).

        For details and examples, see Exporting to Microsoft Excel in the [grid](/wcp_docs/zmz1518211268000.html) documentation.


-   <b>frozen</b>

    Data type: binding-Boolean

    If true, the column displays on the left and doesn't scroll horizontally. If the browser width isn't enough for the total width of the frozen columns, the columns can still scroll.

    If you freeze multiple columns on a mobile app, only the first column moves to the left and freezes.

-   <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

    Text that displays as the column title.

-   <b>render</b>

    Data type: binding-Boolean

    Indicates whether or not the grid adds the `column`. If false, the grid won't include the column and other tags can't reference this column. The default is true.

-   <b>required</b>

    Data type: dynamicBinding-Boolean

    If true, the user must enter values on the column before submitting the page. The column title displays an asterisk to indicate that it's required.

    If you want the specific cell to indicate that it's required, set the `required` attribute in the template tag of the `cellTemplate`.

-   <b>sortableAndFilterable</b>

    Data type: binding-Boolean

    If true, this column enables sort and filter options. When users click the column title, a popup window displays the sort and filter options. The grid also displays an icon that enables users to add filters.

    Notes:

    -   The `sortableAndFilterable` attribute requires the `label` attribute on the `column`.

    -   Use `sortableAndFilterable` only on columns using these widgets:

        -   checkbox
        -   date
        -   instanceList
        -   number
        -   text
        -   time


-   <b>subtotal</b>

    Data type: binding-Boolean

    If true, the editable grid enables a subtotal row as the last row of the grid. The subtotal cell automatically adds the values of the numeric column as the data changes.

    Use `subtotal` only on numeric columns of an editable grid.



