When submitting a service request through the MyTown311 application, residents enter information about the issue. The mayor and the services coordinator want residents to select the issue type from a preexisting list so that the request can be automatically associated with a department. Create a data object for the request type with records for Type, Description, and Department, and reference the data object in the Report Problem step.
The following table provides the credentials you need to complete the challenge.
1 Create a Request type data object
- In the navigation pane of App Studio, click Data to display a list of existing data objects in the application.
- In the upper right, click New to open the Create data object dialog box.
- In the Create data object dialog box, in the Data object name field, enter Request type.
- Click Next to display the data object connection details.
- In the System list, keep the default value of Pega, and then click Submit to create and display the new Request type data object.
- On the Data model tab, click Add field to create a new field for the Request type data object.
- In the Field name field, enter Type to name the field.
- Verify that Type defaults to Text (single line).
- Click Submit & add another to create a new field.
- Repeat steps 7-9 to add two more fields Description and Department as shown in the following image.
- In the upper right, click Save to commit the fields to the data object.
2 Add records to the Request type data object
- In the Request type data object, click the Records tab to display a table that uses the Request type fields (Type, Description, and Department) as the table headers.
- On the Records tab, under the Type column, click Add record to add a new record to the data object.
- In the Type field, enter Park maintenance.
- In the Description field, enter Damaged or broken park or playground equipment.
- In the Department field, enter Parks and Recreation.
- Repeat steps 2-5 to add three more records to the data object by using the information from the following table.
Type Description Department Pothole Pothole in public parking lot or road Public Works Road debris Downed trees, power lines, or other traffic impediments Public Works Traffic signal Traffic signal not working properly Traffic Management
- Click Save.
3 Create a data reference to the Request type data object
- In the navigation pane of App Studio, click Case types > Service Request to display the Service Request case life cycle.
- Click the Report problem step.
- In the configuration pane on the right, click Configure view to display the Report problem view window.
- To the right of the Description field row, click the Delete icon to delete the row.
- Click Add field to add a new field.
- In the Name field, enter Request type to name the field.
- From the Type list, select Data reference.
- In the Data object list, select Request type.
Note: You can also use the search option to find the existing data objects.
- In the Options field, select Single record.
- Expand the Advanced section, and then in the Data page list, confirm that Request type is selected.
- Click Submit to close the Request type field configuration window.
- To the right of Request type field row, click the Gear icon to configure how the data relationship is displayed.
- In the Select record using list, select Drop-down list.
- In the Select using the following field list, confirm that Type is selected.
- Click Submit to close the data relationship configuration.
- Click Submit to close the Report problem view configuration window.
- In the upper right, click Save to commit changes to the Service Request case type.
Confirm your work
- In the Service Request case type, in the upper right, click Save and run to create a new service request case.
- In the Report problem step, under Request type, from the Type drop-down, select Pothole to populate the Type, Description, and Department fields with request information.
3. Repeat step 2 for each option in the Type drop-down and confirm the values change for each selection.