Skip to main content

Adding fields to Views

Archived

3 Tasks

20 mins

Visible to: All users
Beginner
Pega Platform 8.6
Data Integration
User Experience
English
This content is now archived and is no longer updated. Progress is not calculated. Pega Cloud instances are disabled, and badges are no longer awarded. Click here to continue your progress in the latest version.

Scenario

Now that the stages and steps for the MyTown311 Service Request case life cycle are configured, the Mayor and the Services coordinator have determined the information that is necessary to add to certain steps. Configure the views for those steps with fields that gather and display the information. Some views have been configured by a different developer.

The following table provides the credentials you need to complete the challenge.

Role User name Password
Application Developer author@mytown pega123!

Challenge Walkthrough

Detailed Tasks

1 Add editable fields to views

  1. In the App Studio navigation pane, click Case types > Service Request to display the Service Request case life cycle.
  2. In the Service Request case type, click the Report problem step to open the contextual property pane on the right.
  3. In the contextual property pane, click Configure view to add fields to the view.
  4. In the Fields tab, click Add field to add a new field.
  5. In the Field name field, enter Request date.
  6. In the Type list, select Date only.
    Adding a date only field to the Report problem view
  7. Click Submit & add another to add another field to the Report problem view.
    Tip: When a step has multiple fields, use the Submit & add another option.
  8. Repeat steps 5-7 to create a Text (single line) field named Requestor name.
  9. In the Field name field, enter Issue severity.
  10. In the Type list, select Picklist to display the Display as and Picklist options fields.
    1. In the Display as and Picklist options fields, keep the default values.
    2. In the Choices section, click Add choice. An empty field is displayed.
    3. In the Empty field, enter Low as a picklist value.
    4. Repeat steps 10b-10c to create two additional picklist values, Medium and High.
      Adding the Issue severity picklist field to the Report problem view
  11. Click Submit & add another to add another field to the Report problem view.
  12. Repeat steps 5-6 to create a Text (paragraph) field named Description.
  13. Click Submit to dismiss the field creation modal. 
    Tip: Use the Submit option for the last field on a view or if the view only has one field.
    Report problem view configured
  14. For each field, in the Options list, keep the default value of Optional.
  15. In the Report problem window, click Submit.
  16. Click Save to save your work.
    Note: The number of configuration issues decreases from 4 to 3 after you configure the Report problem view.
  17. Repeat steps 2-7 and 13-14 to create the remaining fields by using the information from the following table.
    Tip: Save after configuring each view and notice that the number of configuration issues decreases.

    Stage

    Step

    Field Name

    Field Type

    Options

    Create

    Identify location   

    Address

    Location

    Required

     

    Request updates

    Request updates

    Boolean

    Optional

     

     

    Requestor Email

    Email

    Optional

2 Add a calculated field to the Perform repair view

  1. In the Service Request case type, click the Perform repair step to open the property pane on the right.
  2. In the property pane, click Configure view to add fields to the view.
  3. Under the Field entry row, click Add field.
  4. In the Field name field, enter Total time.
  5. From the Type list, select Integer.
  6. Expand the Advanced section, and then select This is a calculated field (read-only).
    This is a calculated field (read-only) checkbox
  7. In the Function list, select Use expression. An empty field is displayed below.
  8. In the empty field, enter .SetupTime + .RepairTime + .CleanupTime.
    Total time calculated field
  9. Click Submit to add the calculated field to the view.
  10. Click Submit to record the new fields and return to the Workflow tab of the case life cycle.
  11. Click Save to save your changes in the case life cycle.

3 Add a read-only field to the Review repair view

  1. In the Service Request case type, click the Review repair step to open the property pane on the right.
  2. In the contextual property pane to the right, click Configure view.
  3. In the left pane, click Fields to expand the Fields list. 
    Fields list when configuring a view
  4. In the list of fields, hover your pointer to the right of the Total time field to display a Plus icon.
    Hover over the Total time field in the Fields list
  5. Click the Plus icon to add the Total time field to the view list. 
    Note: The Total time field is already Read-only and does not require additional configuration.
  6. Click Submit to record the changes.
  7. Click Save to save your changes to the case life cycle.

Confirm your work

Note: As you advance through the case, enter any required information and verify that each view displays the desired fields.
  1. In the upper right, click Save and run to create a new service request. 
  2. In the Report problem view, click Continue to advance to the Identify location view. 
    Report problem view at runtime
  3. In the Identify location view, click Continue to advance to the Request updates view. 
    Identify location view at runtime
  4. In the Request updates view, click Create to complete the Create process.
    Request updates view at runtime
  5. In the Schedule repair view, click Submit to display the Perform repair view.
    Schedule repair view at runtime
  6. In the Perform repair view, in the Setup time field, enter 10 as the number of minutes spent setting up a repair.
  7. In the Repair time field, enter 80 as the number of minutes spent performing the repair.
  8. In the Cleanup time field, enter 30 as the number of minutes spent cleaning up the site after the repair.
  9. Tab or click out of the Cleanup time field to allow the calculation to execute and provide a total. In this case, the amount in the Total repair time field is 120.
    Perform repair view at runtime
  10. Click Submit to display the Approval view.
  11. In the Approval view, confirm the time entry fields display as read-only fields with the numbers you entered in steps 7-9.
    Approval view at runtime
  12. Click Approve to resolve the case.


Available in the following missions:

We'd prefer it if you saw us at our best.

Pega Academy has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice