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

<a id="section_N10021_N1001E_N10001"></a>
Displays a list of comment history or process history in a `bpExtender`. You can use `bpTemplatedList` only with the `commentHistory` and `processHistory` attributes of `bpExtender`, and only on edit pages.

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

This snippet is a sample `commentHistory` in `bpExtender`.

```
"commentHistory" : {
       "type" : "bpTemplatedList",
       "on" : "<% commentHistoryApi.data %>",
       "as" : "commentData",
       "template" : {
         "type" : "commentHistory",
         "author" : {
           "type" : "instanceList",
           "instanceList" : [ {
             "id" : "1",
             "descriptor" : "<% commentData.person.descriptor %>"
           } ]
         },
         "text" : {
           "type" : "text",
           "value" : "<% commentData.comment %>"
         },
         "date" : {
           "type" : "date",
           "datePrecision": "SECOND",
           "dateFormat": "yyyy-MM-dd'T'HH:mm:ss",
           "displayTimeZone": "<% userInfo.data[0].timezone %>",
           "value" : "<% commentData.commentDate %>"
         }
       }
},
```

This diagram displays the placement of the `commentHistory` attributes:

![](GUID-bcceac72-27bc-4730-a5eb-69170fa8188c-enHYPHENus.png)

The `on` attribute specifies the data for the list of comments. The snippet uses a sample `commentHistoryApi` endpoint:

```
{
     "name": "commentHistoryApi",
     "baseUrlType": "workday-businessProcess",
     "url": "<% 'events/' + queryParams.eventId + '/comments' %>",
     "authType": "sso"
},
```

This AMD snippet in `dataProviders[]` shows the `workday-businessProcess` base URL:

```
{
     "key": "workday-businessProcess",
     "value": "https://api.workday.com/businessProcess/v1/"
}
```

This snippet is a sample `processHistory` in `bpExtender`.

```
"processHistory" : {
 "type" : "bpTemplatedList",
 "on" : "<% processHistoryApi.data %>",
 "as" : "processData",
 "template" : {
   "type" : "processHistory",
   "actionEvent" : {
     "type" : "instanceList",
     "instanceList" : [ {
        "id" : "1",
        "descriptor" : "Some Process"
     } ]
   },
   "workflowStep" : {
     "type" : "instanceList",
     "instanceList" : [ {
        "id" : "1",
        "descriptor" : "<% processData.descriptor %>"
      } ]
   },
   "status" : {
     "type" : "text",
     "value" : "<% processData.status.descriptor %>"
   },
   "completedDate" : {
     "type" : "date",
     "datePrecision": "SECOND",
     "dateFormat": "yyyy-MM-dd'T'HH:mm:ss",
     "displayTimeZone": "<% userInfo.data[0].timezone %>",
     "value" : "<% processData.completedDate %>"
   },
   "user" : {
     "type" : "instanceList",
     "instanceList" : [ {
        "id" : "1",
        "descriptor" : "<% processData.completedByPerson.descriptor %>"
     } ]
   },
   "delegationMessage" : {
     "type" : "text",
     "value" : "<% processData.event.descriptor %>"
   }
 }
}
```

This diagram displays the placement of the `processHistory` template attributes:

![](GUID-a0690293-98fd-4c17-b53f-7250e5921192-enHYPHENus.png)

Similar to the `commentHistory` example, this example uses a sample `processHistoryApi` endpoint. See the `on` attribute description for details.

The `on` attribute specifies the data for the process history. The snippet uses a sample `processHistoryApi` endpoint:

```
{
     "name": "processHistoryApi",
     "baseUrlType": "workday-businessProcess",
     "url": "<% 'events/' + queryParams.eventId + '/completedSteps' %>",
     "authType": "sso"
}
```

Similarly, this AMD snippet shows the `workday-businessProcess` base URL:

```
{
     "key": "workday-businessProcess",
     "value": "https://api.workday.com/businessProcess/v1/"
   }
```

<b>Note:</b> By default, the dates in Workday REST APIs use the UTC timezone. To display dates using the user timezone in `commentHistory` and `processHistory`, set the `displayTimeZone` attribute of the `date` tag. The `displayTimeZone` in the above snippets use the Workday User Info REST API in the Common service to get the timezone of the currently signed-in user. Sample endpoint definition:

```
{
     "baseUrlType": "workday-common",
     "name": "userInfo",
     "authType": "sso",
     "url": "userInfo"
   }
```

## <a id="section-mobile-support"></a>Mobile Support

Android, iOS

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

-   <b>as</b>

    Data type: string

    Required. A string that references the current iteration in the list provided by the `on` attribute.

-   <b>id</b>

    Data type: binding-String

    Unique identifier used to reference this widget from other tags.

    Notes:

    -   The `id` must start with a letter.
    -   The `id` must be unique per page.
    -   To enable other widgets to reference this widget `id`, place this widget before the other widgets on the PMD. The PMD validation returns an "Undefined variable" error if it doesn't find a previously defined `id` in the PMD.
    -   Workday recommends that you include the `id` in your tag definitions for debugging purposes.

-   <b>on</b>

    Data type: binding-List

    The list of values to iterate with a `bpTemplatedList`. Specify the endpoint and field path of the data collection.

    Comment history example:

    ```
    "on" : "<% commentHistoryApi.data %>",
    ```

    Process history example:

    ```
    "on" : "<% processHistoryApi.data %>",
    ```

-   <b>template</b>

    Data type: object

    Contains a template for either the `commentHistory` or `processHistory` component in `bpExtender`.

    For `commentHistory`, set these template attributes:

    -   `type`: (Required) `commentHistory`.
    -   `author`: (Required) An `instanceList` tag that lists users who added comments.
    -   `date`: (Required) A `date` tag that displays when the comment was added.
    -   `text`: (Required) A `text` tag that displays the comment.
    -   `delegate`: (Optional) A `text` tag that displays a delegate name, or any related text about the comment.
    -   `authorImage`: (Optional) An `image` tag that displays the comment author. If not provided, a cloud image displays.
    -   `status`: (Optional) A `text` tag that displays the status.

    For `processHistory`, set these template attributes:

    -   `type`: (Required) `processHistory`.
    -   `actionEvent`: (Required) An `instanceList` tag that displays as the default if you don't specify `workflowStep`.
    -   `workflowStep`: (Optional) An `instanceList` tag that lists the process steps. If you include `workflowStep`, it overrides `actionEvent`.
    -   `status`: (Optional) A `text` tag that displays the status.
    -   `completedDate`: (Optional) A `date` tag that displays when the process is completed.
    -   `dueDate`: (Optional) A `date` tag that displays when the process is due. If you include both `dueDate` and `completedDate`, only the `dueDate` displays.
    -   `user`: (Optional) An `instanceList` tag that lists the assigned users.
    -   `userImage`: (Optional) An `image` tag that displays the user. If not provided, a cloud image displays.
    -   `delegationMessage`: (Optional) A `text` tag that displays an event description or message.



### Related Information

[bpExtender](/wcp_docs/khd1559765406895.html)

[bpButton](/wcp_docs/awq1559797247759.html)

[Reference: Workday Extend API Gateways and Authorization Base URLs](/wcp_docs/dlh1653340161856.html)

