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

<a id="section_N10021_N1001E_N10001"></a>
Displays a row for each file attachment on the `fileUploader` tag.

Use `fileUploaderRow` on view and edit pages.

`fileUploaderRow` is a child tag of the `fileUploader` tag. The `getChildren` and `getRows` methods of `fileUploader` return `fileUploaderRow` instances, which enable you to access their `fileName` property.

See the [fileUploader](/wcp_docs/icc1518036830536.html) tag for usage and examples.

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

Android, iOS

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

-   <b>allowRemove</b>

    Data type: binding-Boolean

    Indicates whether or not users can delete the attachment. If you set `allowRemove` to true, specify the `deleteEndPoint` attribute on `fileUploader`.

-   <b>attachment</b>

    Data type: attachmentList

    Specifies an `attachmentList` tag that represents an attachment instance. See [attachmentList](/wcp_docs/kwi1512515794634.html).

-   <b>contentArea</b>

    Data type: list of tags

    An array containing widgets that display on `fileUploaderRow` that preloads files using upon page load. Use this area to display information about the file. Example:

    ```
    "contentArea": [
    {
      "type": "text",
      "label": "File description:",
      "value": "<% attachment.descriptor %>",
      "enabled": "<% false %>"
    }
    ]
    ```

-   <b>enabled</b>

    Data type: dynamicBinding-Boolean

    If true, users can enter values on the widget. If false, users can only view the widget.

-   <b>fileName</b>

    Data type: binding-String

    Name that displays for the attachment file.

-   <b>fileSize</b>

    Data type: number

    The numeric size of the attachment file.

-   <b>fileSource</b>

    Data type: binding-EndPoint

    A deferred endpoint that returns the file.

    If you specify `fileSource`, the page load caches the file content on the server. When the user submits the page, it also submits the file to the outbound endpoint.

-   <b>fileType</b>

    Data type: binding-String

    The type of the file, which determines the appropriate file type icon to display. If blank, fileUploaderRow uses the default icon. Available icons include PDF, Word, Excel, PPT. Example: A fileType of "application/pdf" or ".pdf" renders a PDF icon.

-   <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>render</b>

    Data type: binding-Boolean

    If true, this tag renders as a widget on the page. If false, the loaded page doesn't add this tag or its children. The default is true.

    Unlike the `visible` attribute, when `render` is false, other tags on the page can't reference this tag or widget on edit pages. On view pages, a tag can't reference other tags regardless of the `render` attribute value.

-   <b>uploadedDate</b>

    Data type: date

    Displays the day or time when the user uploaded the file. This sample uses the `date:getTodaysDate` function, which returns the current date at 12:00 am. If a user uploads the file at 10:00 am, `uploadedDate` displays "10 hours ago".

    ```
    "uploadedDate": {
      "type": "date",
      "id": "todaysDate",
      "value": "<% date:getTodaysDate(null) %>"
    }
    ```



## <a id="section_xr1_fqc_yrb"></a>PMD Scripting Methods

-   <b>getContentArea(int index)</b>

    Return type: `List`

    Description: Returns a list of widgets that represent custom information about the file on the row. Specify the index of the tag based on its position in the `contentArea[]` of the `fileUploaderRow`. You can use this method (or the equivalent `contentArea` property) to:

    -   Get or dynamically update the widgets in the `contentArea` of an existing `fileUploaderRow` instance.
    -   Dynamically update the widgets in the `contentArea` of a new row using the `fileUploaderRowTemplate` attribute of `fileUploader`.

    <b>Note:</b> The `contentArea` attribute of `fileUploaderRow` contains tags that render custom information. The `getContentArea(index)` method doesn't apply to the `fileName` attribute of `fileUploaderRow`.

    In this sample `fileUploader`, the `contentArea` of an existing row contains a text tag that displays file information. The `onChange` event on a separate text tag updates the file information in the `contentArea`.

    ```
    
    {
     "type": "fileUploader",
     "id": "myFileUploader1",
     "label": "My FileUploader with an Attachment",
     "fileTypes": "*",
     "children": [
       {
       "type": "fileUploaderRow",
       "allowRemove": false,
       "attachment": {
           "type": "attachmentList",
           "instanceList": [
           {
               "descriptor": "abc.txt",
               "action": "attachment",
               "mimeType": "text/plain"
           }
           ],
           "attachmentUriTemplate": "[Target]",
           "attachmentURL": "http://www.workday.com",
           "attachmentName": "abc.txt",
           "attachmentAuth": "sso"
       },
       "fileName": "abc.txt",
       "fileType": "text/plain",
       "contentArea": [
           {
           "type": "text",
           "id": "fileInfo",
           "label": "File comment"
           }
       ]
       }
     ]
    },
    {
     "type": "text",
     "id": "fileInfoUpdate",
     "onChange": "<% myFileUploader1.rows[0].contentArea[0].value = self.value; %>"
    }
    ```

    In the above example, when a user enters information in the <i>fileInfoUpdate</i> text widget, its `onChange` event handler calls `getContentArea` on the first row, gets the `contentArea` of the first widget, and updates its value with the user input.

    In this next example, the `fileUploaderRowTemplate` creates the `contentArea` of a new row on the fileUploader. The `onChange` event on a text widget in the `contentArea` dynamically sets the value of another text widget:

    ```
    {
     "type": "fileUploader",
     "id": "myFileUploader2",
     "label": "My FileUploader 2",
     "fileTypes": "*",
     "fileUploaderRowTemplate": [
       {
         "type": "text",
         "label": "Comments",
         "id": "comments1",
         "onChange": "<% comments2.value = self.value; %>",
         "required": true
       },
       {
         "type": "text",
         "label": "More comments",
         "id": "comments2",
         "required": true
       }
     ]
    }
    ```

-   <b>getFileName()</b>

    Return type: `string`

    Description: Returns the name of the file on the `fileUploaderRow`.



