Creating a data relationship
Archived
3 Tasks
15 mins
Scenario
The mayor of myTown asks you, the town projects manager, to enable residents who report problems online to enter contact information and list any previous issues at the same site. You must add the necessary data relationship to the Service Request application.
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 Create the Submitter information data relationship
- In the App Studio navigation pane, click Case types > Service Request to display the Service Request case life cycle.
- In the Service Request case type, click the Identify submitter step to open the Step properties pane on the right.
- In the Step properties pane, click Configure view to configure the view of the step.
- In the view configuration dialog box, on the Fields tab, click Add field to add a field to the Identify submitter view.
- In the field configuration window, in the Field name field, enter Submitter information to name the field.
- In the Type list, select Data relationship.
- In the Target type list, select Define new data object.
- In the Data object name field, enter Submitter information to name the data object, and then click OK.
- Click Submit to close the field configuration window.
- In the Options list, to the right of View, select Create default view.
- Click Open to create fields within the Submitter information data relationship.
- Click Add field.
- In the Field name field, enter Submitter First Name. The Type list defaults to Text (single line).
- Create three additional fields by using the information in the following table.
Field Name
Field Type
Submitter Last Name
Text (single line)
Submitter Address
Text (paragraph)
Submitter Phone Number
Phone
Note: The address is captured in one Text (paragraph) field to keep this challenge brief. In a real-world application, an address is captured in separate fields, such as street, city, state/province, and ZIP/postal code to automate data analysis in the application. - Click Submit to dismiss the view configuration dialog box.
- In the upper right, click Save to save your work.
2 Create the Previous issues at this location multiple record data relationship
- In the Service Request case type, click the Identify location step.
- In the Step property pane to the right, click Configure view to configure the view of the step.
- In the view configuration dialog box, on the Fields tab, click Add field.
- In the field configuration window, in the Field name field, enter Previous issues at this location to name the field.
- In the Type list, select Data relationship.
- In the Target type list, select Define new data object.
- In the Data object name field, enter Previous issues at this location to name the data object.
- In the Options list, select Multiple records.
- Click Submit to close the field configuration window.
- In the view configuration dialog box, click Add field to Previous issues at this location > Add new field to add a new field to the Previous issues at this location data relationship.
- In the field configuration window, in the Field name field, enter Date to name the first field.
- In the Type list, select Date only.
- Click Submit & add another.
- Use the following image to add the remaining fields.
- To the right of the blank row, click the Delete icon to remove the row.
- Click Submit to dismiss the view configuration dialog box.
- Click Save to save your work.
3 Confirm your work (section not graded)
- In the Service Request case type, click the Data model tab to confirm that your fields are displayed correctly.
- In the Options column, click Previous issues at this location to see the data relationship details.
- In the upper left, click the Back to previous page icon to return to the case life cycle.
- Click the Data Model tab to return to the Service Request data model.
- In the Options column, click Submitter information to see the data relationship details.
- In the upper left, click the Back to previous page icon to return to the Workflow tab.
- In the upper right, click Save and run.
- In the Report problem view, click Continue to advance to the Identify location view.
- In the Identify location step, enter an address in the Address field and several issues to the Previous issues at this location fields.
- Click Continue.
- In the Identify submitter step, enter submitter information details.