---
nav: wcp_docs
parent_url: /wcp_docs/
title: Create an Edit Page to Submit Workday Data
layout: subsection
---

An <b>Edit</b> page in a Workday Extend custom app is designed to let you input data and submit it to a business object. It centralizes all relevant fields, validations, and conditional logic needed to safely update that object, while respecting security, field-level visibility, and tenant configuration.

In this activity, you’ll:

-   Use a Basic Form Layout to build a basic input form with instructions.
-   Create three Layout Sections that contain Field Sets and input fields, including a Date field and Instance Lists from which users can select worker names and office locations.
-   Configure Inbound API endpoint that gets data from a Workday API.
-   Configure an outbound API endpoint that sends data to a custom business object.


![](GUID-4c1f47e7-30ae-4fb1-a1b1-9c26239a6c9f.png)

## <a id="before-you-begin"></a>Before You Begin: Create an Account on the Workday Build Platform

To do this activity, you must have an account on the Workday Build platform and a development tenant. If you’ve already created an account and a tenant, you can go to the first task of this activity.

If you haven’t already created an account, you can do so now. It’s free!

1.  Go to the [Workday Build Platform](https://developer.workday.com) and create an account with your personal email address.
2.  Once you have created an account, sign in to the [Workday Build Platform](https://developer.workday.com).
3.  In the upper-left corner, select the hamburger menu, and under <b>Console</b>, select <b>Tenants</b>.
4.  On the <b>Tenants</b> page, select <b>Create Tenant</b>. It will take 1 to 2 minutes for the development tenant to be created.
5.  Check your personal email for a link to change your tenant password.

    <b>Note:</b> Remember the password. You’ll need to sign in to the tenant while you do this activity.

6.  Sign in to the tenant with the username <i>lmcneil</i> and the password that you just created.


<b>Note:</b> When you sign in to the development tenant with the username <i>lmcneil</i>, you’re signing in as the persona <i>Logan McNeil</i>. Logan is one of several user accounts that you can use to test the agents and app that you create and deploy to your development tenant.

## Task #1: Create an Extend App from Starter Code

To begin, create an Extend app from starter code that we’ve provided below. The starter code includes a model business object and security domain.

1.  Download the [WorkDesignationStarterCode.zip](GUID-90222c69-f297-4535-81b9-36915ad84a3c.zip) file.
2.  On your Express Lab laptop, select the browser tab for the[Workday Developer Platform](https://developer.workday.com).
3.  On the Developer Site home page, select <b>Build an Extend App</b>.
4.  Select <b>Upload a Zip File</b>.
5.  In the Name field, enter <i>Get User Input App</i>. The <b>Reference ID</b> will automatically populate based on the app's name.
6.  Click <b>Select a File</b>, navigate to your computer’s Download folder, and select the [WorkDesignationStarterCode.zip](GUID-90222c69-f297-4535-81b9-36915ad84a3c.zip) file.
7.  Select <b>Create and Edit</b>. This opens <b>App Builder</b>.


<b>Expected result:</b> App Builder should be open with your newly created app, as shown below.

![](GUID-f39bc6de-777d-471b-918a-63ff78d20935.png)

## Task #2: Deploy the App and Configure the Security Domain

To ensure your application is functional and secure, deploy it to your development tenant. In this task, you will deploy your app, create a dedicated security domain, and configure the necessary permissions. These steps are essential for controlling user access and protecting the data processed by your application.

1.  In the upper right corner of App Builder, select <b>Save and Deploy</b>.
2.  In the Deploy pop-up window, select your tenant, select <b>Deploy to Tenant</b>, and sign in to the tenant.
3.  In the <b>Deploy Successful</b> pop-up window, select <b>Manage in Tenant</b>. This launches the App Manager report. App Manager is the central Workday Extend console where you register, configure, secure, deploy, and monitor your Extend applications and their APIs across your tenant.
4.  In App Manager, find your app and select <b>Configure</b>.
5.  Scroll down the App Details page to the Security Domains section, and to the right of the Work Designation Security Domain, select <b>Create</b>.
6.  In the <b>Create Security Policy for Domain</b> pop-up window, check the <b>Confirm</b> box and select <b>OK</b>. This will take you to the <b>Edit Permissions</b> page.
7.  On the <b>Create Security Policy for Domain</b> page, in the Report/Task Permissions table, select the <b>+ Add Row</b> icon.
8.  In the <b>Security Groups</b> field, enter <i>HR Admin</i>, press <b>Enter</b>, and select <b>HR Administrator</b>.
9.  Check the <b>View</b> and <b>Modify</b> boxes, select <b>OK</b>, and select <b>Done</b>. This will return you to the App Details page.
10. In the <b>Security Domains</b> section, select <b>Activate Pending Security</b>. You <i>must</i> activate the security changes in order for them to take effect.
11. In the Comment field, enter <i>Create security policy</i> and select <b>OK</b>.
12. On the next page, check the <b>Confirm</b> box and select <b>OK</b>.


✅ <b>Expected result</b>: You must give one or more security groups Report/Task Permissions in a Workday Extend app. This enables Workday to know which users are allowed to access the app’s reports, tasks, and APIs at runtime, enforcing tenant security and preventing unauthorized users from running or viewing the app’s functionality and data.

![](GUID-9e6dabe4-236e-4422-8c8f-4811ce9a38be.png)

## Task #3: Create an Inbound Endpoint That Gets Workers Names

In an input form, you can enable users to pick from a list of values, such as worker names or locations. To do this, you must add an Inbound API Endpoint to the page that will get the data you want to display.

An <i>Inbound API Endpoint</i> is designed to retrieve data from an API or external source. Its primary purpose is to fetch this data so it can be used to dynamically populate UI components, such as Instance Lists, allowing users to view or select information directly within the app.

In this task, you’ll create an Inbound API Endpoint from which you can get data and display it in an Instance List, which you’ll configure in the following tasks.

1.  Return to App Builder, select the <b>changeWorkLocations</b> page, and select the <b>Page Load</b> tab.
2.  In the <b>Inbound Endpoints</b> section, hover above locationValuesGet Endpoint, select <b>+ Add Inbound Endpoint</b> &gt; <b>REST Endpoint</b>.
3.  In the Enter Name field, enter <i>getAllWorkers</i>.
4.  In the <b>HTTP Method</b> field, select <i>Get (default)</i>.
5.  In the <b>Base URL Type</b> field, enter <i>staffing.</i>This is a key of a dataProvider in the App Metadata (AMD) component. It specifies the base URL of [Staffing REST API](https://developer.workday.com/rest-api-explorer/docs/staffing/v7#get-/workers).
6.  In the <b>URL</b>field, enter <i>/workers.</i>This is the endpoint of the Staffing REST API.
7.  In the <b>Auth Type</b> field, enter <i>sso</i>.
8.  Select <b>Save to App Hub</b>.


✅ <b>Expected result:</b>The <i>getAllWorkers</i>inbound endpoint should be configured to get a list of workers from the Staffing REST API.

![](GUID-c2691261-f474-4a28-9571-04d52aad16c2.png)

## Task #4: Create Outbound API Endpoint That Submits Form Data

An <i>Outbound API Endpoint</i> is a component configured to submit data from a page to a Workday business object or a custom business object. Its primary purpose is to enable users to submit form data, ensuring that the information is successfully persisted within Workday.

This is a good point to add the Outbound Endpoint because you’ll need to reference it when you configure the Value Out Bindings on the input fields that you’ll create in the following tasks.

1.  On the <i>changeWorkLocation</i>page, select the <b>Page Submit</b> tab.
2.  In the <b>Outbound Endpoints</b> section, select <b>+ Add Outbound Data</b> &gt; <b>Outbound REST Endpoint</b>.
3.  Name the outbound endpoint <i>createWorkDesignation</i>.
4.  In the <b>HTTP Method</b> field, select <i>Post (default)</i>.
5.  In the <b>Base URL Type</b> field, enter <i>app</i>.
6.  In the <b>URL</b>field, enter <i>workdesignations</i>.
7.  In the <b>Auth Type</b> field, enter <i>sso</i>.
8.  Select the <b>On Send</b> tab, and in the text field, enter:

    ```
    console.info(json:asJSON(self.data)); return self.data;
    ```

9.  Select the <b>Error Handling</b> tab and select <i><b>+ Add Fail On Status Codes</b></i>:

    -   In the <b>Code</b>field, enter <i>400</i>, and in the <b>Code Name</b> field, enter <i>Bad request</i>.
    -   Select <b>+ Add Item</b>, and in the <b>Code</b>field, enter <i>403</i>, and in the <b>Code Name</b> field, enter <i>Forbidden</i>.

10. Select <b>Save to App Hub</b>.


✅ <b>Expected result:</b> The createWorkDesignation Outbound REST Endpoint is successfully configured with the correct method, URL, and error handling settings, making it ready to be referenced by your form's fields to persist user-submitted data to your business object.

![](GUID-feb636b1-a076-45b8-b8d1-fe252af77f6b.png)

## Task #5: Add a Field Set and an Instance List to Display Worker Names

In this task, you’ll add a new Layout Section with a Field Set and an Instance List, which will display a list of workers retrieved by the inbound API endpoint that you created in the previous task.

A <i>Field Set</i> is a layout container used in a Workday Extend app page to group related fields or sections under a specific title, helping to organize the interface into distinct, logical categories.

An <i>Instance List</i> enables you to display a selectable collection of items, providing a user-friendly way for users to browse and pick specific values from a set of data.

1.  On the changeWorkLocation page, select the <b>Presentation</b> tab.
2.  Scroll down the page below the Rich Text tag, hover over the vertical <b>Basic Form Layer line</b> (see image below), and select <b>+ Add Layout Section in Basic Form Layout</b>.

    ![](GUID-0abf509d-a6a2-40e7-b41c-b9a23374bad1.png)

3.  On the new Layout Section card, select <b>+ Add Child</b>, and select <b>Field Set</b>.
4.  In the Field Set tag’s Title field, enter <i>Select an Employee</i>.
5.  On the Field Set card, select <b>+ Add Child</b>, and select <b>Section</b>.
6.  Expand the Section tag and check the <b>Horizontal</b> box so that it’s set to <b>true</b>.
7.  Select <b>+ Add Column Width Ratios</b>:

    1.  In the 0 column, enter <i>.3</i>.
    2.  Select <b>+ Add Item</b>, and in the 1 column, enter <i>.7</i>.

8.  On the Section tag, select <b>+ Add Child</b>, and select <b>Section</b>.
9.  On the new Section, select <b>+ Add Child</b>, and select <b>Instance List</b>.
10. Select the <b>Expand ></b> icon to show all the Instance List’s attributes:

    1.  In the ID field, enter <i>workerSearch</i>.
    2.  In the Label, enter <i>Employee</i>.
    3.  In the Display Key field, enter <i>descriptor</i>. The <b>Display Key</b> specifies which field from the data source should be displayed in the list. In this case, the descriptor field holds the worker name.
    4.  In the ID Key field, enter <i>id</i>. The <b>ID Key</b> attribute acts as the unique identifier for each item. When a user selects a name from the list, the ID Key ensures the unique ID is correctly passed to the business object.
    5.  Check the <b>Required</b> box (true). This means the user must enter data in the field.
    6.  In the Value Out Binding field, enter <i>createWorkDesignation.worker.id</i>. The <b>Value Out Binding</b> attribute maps the data entered by a user into a UI element (such as an Instance List or Date field) to the corresponding field defined in your Outbound API endpoint.
    7.  In the Values attribute, enter getAllWorkers.data. This PMD script references the getAllWorkers inbound API endpoint, where .data accesses the root element of the JSON response.

11. Open <b>App Preview,</b> and in the upper-right, select the <b>App Preview pop-up window</b> icon to open it in a new browser tab.
12. Select the <b>Employee</b> instance list to verify that it displays worker names.
13. Save to <b>App Hub</b>.


✅ <b>Expected Outcome</b>: In a new section, you have created an Instance List from which a user can select an employee’s name. It specifies a value out binding that will enable the selected value to be submitted to the business object.

![](GUID-b734904c-4781-4185-b7ef-fab8c70196ad.png)

## Task #6: Add and Format a Date Field

In this task, you’ll create a third Layout Section that will contain a Date field and an Instance List from which users can select work locations. (You’ll add the Instance List in the following tasks.)

In a Date tag, you can use a PMD script to ensure data is collected or presented in the correct format.

1.  On the changeWorkLocation page, hover over the vertical Basic Form Layer line below the second Layout Section, and select <b>+ Add Layout Section in Basic Form Layout</b>.
2.  Select <b>+ Add Child</b> and select <b>Field Set</b>.
3.  In the <b>Field Set Title</b>, enter <i>Request Details</i>.
4.  On the Field Set tag, select <b>+ Add Child</b>, search for and select <b>Date</b>.
5.  On the Date tag’s ID field, enter <i>effectiveDate</i> and in the Label field, enter <i>Effective Date</i>.
6.  Select the Value field, and to the right of the field, select <b></></b> <b>Change to scripted value</b>.
7.  To the right of the Value field, select </> to change the field to a scripted value and in the field enter this PMD script: date:now(userTimeZone).format('yyyy-MM-dd')
8.  Check the <b>Required</b> box so that it’s set to true.
9.  Select <b>+ Add Values Out</b>:

    1.  In the Value field, select the </> icon to change it to a scripted value and enter <i>self.value</i>.
    2.  In the Value Out Binding field, enter <i>createWorkDesignation.date</i>.

10. Open App Preview to check your changes.
11. <b>Save to App Hub</b>.


✅ <b>Expected Result</b>: You should see the third layout section with a title and a date field displaying today’s date.

![](GUID-a1eba623-3d0d-4d35-9582-915586682164.png)

## Task #7: Add an Inbound API Endpoint to Get Work Locations

Let’s add an Inbound WQL Endpoint to the page that will return work location data.

<i>Workday Query Language (WQL)</i> is a query language used within Workday Extend apps to fetch specific, structured data from Workday. Developers can dynamically populate UI components such as Instance Lists using WQL.

1.  On the changeWorkLocation page, select <b>Page Load</b>.
2.  Hover over the area below the getAllWorkers inbound endpoint and select <b>Add Inbound Endpoint</b> &gt; <b>WQL Endpoint</b>.
3.  In the <b>Enter Name</b> field, enter <i>getLocationValues</i>. This is the name that PMD tags on the page will use to reference the endpoint.
4.  Keep the <b>HTTP Method</b> set to <i>Get (default)</i>.
5.  In the <b>Base URL Type</b> field, enter <i>wql</i>. This references a data provider declared in the AMD component.
6.  To the right of the <b>URL</b>field, select <i></></i> to change it to a scripted value.
7.  Copy the WQL query below:

    ```
    let query = 'select location, country from locationsUsedAsBusinessSite';  
    return `/data?query=` + query.urlEncode();
    ```

8.  In the <b>URL</b>field, paste the WQL query.
9.  In the <b>Auth Type</b> field, enter <i>sso</i>.
10. Select <b>Save to App Hub</b>.


✅ <b>Expected Result</b>: Your Inbound Endpoint should be configured like the one in the image below.

![](GUID-24e8887e-d109-4589-91b2-6b7dc4f9256a.png)

## Task #8: Create an Instance List That Displays Work Locations

In this task, you’ll create an Instance List that will display a list of work locations. The list will be populated from a Workday API endpoint that uses a Workday Query Language (WQL) query.

An <i>Instance List</i> displays a selectable collection of items, such as a list of employees or work locations. An Instance List provides a user-friendly way for users to browse and pick specific values from a set of data.

1.  On the changeWorkLocation page, select the <b>Presentation</b> tab.
2.  Scroll down to the Date tag, hover over the area below the Date tag, select <b>+ Add Tag in Field Set</b>, then search for and select <b>Instance List</b>.
3.  In the <b>ID</b>field, enter <i>proposedLocation</i> and in the <b>Label</b>field, enter <i>Work Location</i>.
4.  Check the <b>Required</b> box so that it’s set to true.
5.  In the <b>Display Key</b> field, enter <i>descriptor</i>.
6.  In the <b>ID Key</b> field, enter <i>descriptor</i>.
7.  In the <b>Value Out Binding</b> field, enter <i>createWorkDesignation.workLocation</i>.
8.  To the right of the <b>Values</b>field, select <i></></i> to change the field to a scripted value, and in the field enter the PMD script below.

    ```
    getLocationValues.data.map(x => x.location)
    ```

    <b>Note:</b> This PMD script uses the <i>map ( )</i> function to iterate over objects in the data and return values from the <b>location</b> field. <i>getLocationValues</i> is the name of the API endpoint and <i>data</i> is the JSON path to the root of the data structure.

9.  Open <b>App Preview</b>, and if necessary, reconnect to the tenant.
10. In App Preview or the App Preview Pop-Up window (shown below), select the <b>Work Location Instance List</b>. It should display a list of cities.
11. Select <b>Save to App Hub</b>.


✅ <b>Expected Result</b>: In the App Preview Pop-Up window, shown below, select the Work Location Instance List to see a list of cities from which the user can pick.

![](GUID-5e37f85f-9626-4bdc-9f81-112fce375b43.png)

## Task #9: Create a Hardcoded List for Workplace Designations

In this task, you’ll add a new Instance List to indicate if the employee:

1.  Works from Home.
2.  Works Hybrid - Partially at Home and Partially in the Office.
3.  Entirely in the Office


If the employee works entirely from Home, then you need to hide the <b>Proposed Location</b> field. If the employee works hybrid or entirely in the Office, then you will need to display the <b>Proposed Location</b> field.

1.  On the changeWorkLocation page, select the <b>Presentation</b> tab.
2.  Scroll down to the Field Set with the title <b>Request Details</b>.
3.  In the Field Set, hover over the area below the <b>Date</b> tag <i>(effectiveDate)</i> and above the <b>Instance List</b> tag <i>(proposedLocation)</i>, select the <b>+ Add Tag in Field Set</b> icon, and select <b>Instance List</b>.
4.  In the new Instance List tag:

    1.  Set <b>ID</b> to <i>proposedWorkDesignation.</i>
    2.  Set <b>Label</b> to <i>Work Designation</i>.
    3.  Check the <b>Required</b> attribute so that it is set to <b>true</b>.

5.  Scroll down the Instance List tag, select <b>Add Instance List</b>, and add the first option to the list:

    1.  In the ID field, enter <i>HOME.</i>
    2.  In the Descriptor field, enter <i>Works Fully from Home</i>.

6.  Select <b>Add Item</b> to add a second option to the list:

    1.  In the ID field, enter <i>HYBRID</i>.
    2.  In the Descriptor field, enter <i>Works from Home and the Office</i>.

7.  Select <b>Add Item</b> to add a third option to the list:

    1.  In the ID field, enter <i>OFFICE</i>.
    2.  In the Descriptor field, enter <i>Works Fully in the Office</i>.

    ![](GUID-ba74c4a7-521f-412d-a99d-478d5058c6b5.png)

8.  Copy the code block below. This is a [PMD script](/wcp_docs/oli1581402304020.html#G_PEER_1) that controls the location field based on the value that the user selects. If they select HOME, it clears the proposed location (setValue([ ])) and hides the proposedLocation field (visible = false). If the selection is HYBRID or OFFICE, then the proposedLocation field remains visible.

    ```
    if(proposedWorkDesignation.value.first() == 'HOME') {
      console.info('In the Fully From Home code branch');
      proposedLocation.setValue([]);
      proposedLocation.visible = false;
    } else {  
      console.info('In the office or hybrid code branch');
      proposedLocation.setValue([]);
      proposedLocation.visible = true;                                      
    }
    ```

9.  Scroll down to the On Change attribute and paste the code into it.
10. In the Values Out Binding field, enter <i>createWorkDesignation.workType</i>.
11. Return to <b>App Preview Pop-Out</b> window and refresh the page.
12. From the Work Designation list, select <b>Works Entirely From Home.</b>


✅ <b>Expected Result</b>: When <b>Works Entirely From Home</b> is selected, the <b>Work Location</b> field is hidden. When <b>Works in the Office</b> or <b>Works Hybrid</b> are selected, the <b>Proposed Work Location</b> remains visible.

![](GUID-0d2d5910-cfb0-4bb9-ad2c-a07569f9169e.png)

## Task #10: Test the Input Page

Now that you have configured your layout, fields, and API endpoints, it is time to verify the end-to-end functionality of your edit page. In this final task, you will complete the form, trigger the submission, and confirm that the data is correctly persisted to your custom business object.

1.  Select the changeWorkLocation page, open <b>App Preview,</b> and select the App Preview pop-up window icon to view the page in a new browser tab.
2.  Complete the form:

    1.  Select a worker from the <b>Employee</b> list.
    2.  Pick an <b>Effective Date</b>.
    3.  From the <b>Work Designation</b> list, select <i>HOME</i>, <i>OFFICE</i>, or <i>HYBRID</i>
    4.  If you selected <i>OFFICE</i>or <i>HYBRID</i>, select a city from the <b>Work Location</b> list. (If you picked <i>HOME</i>, the <b>Work Location</b> list should not be visible.)

3.  Select <b>OK</b> to submit the form. You should be routed to the home page, where you’ll see the data you submitted displayed in a grid.


✅ <b>Expected Result:</b> You should be routed to the home page, where you’ll see the data you submitted displayed in a grid.

![](GUID-07988a5a-fb71-47b4-9847-838e645fd35c.png)

## Congratulations

In this tutorial, you learned how to create and configure an Edit page in a Workday Extend custom app to collect and submit user data. You gained experience in:

-   Creating an app from starter code and deploying it to a tenant.
-   Configuring security domains and permissions.
-   Setting up Inbound API endpoints to fetch data (worker names and locations) and Outbound API endpoints to submit form data.
-   Designing a user interface with layout sections, field sets, date fields, and instance lists.
-   Implementing PMD scripting to handle conditional logic, such as showing or hiding fields based on user selection.


