Displaying list data in Views
3 Tasks
10 mins
Scenario
The GoGoRoad application presents a list in a table of all available service providers for roadside assistance. The UI consultant wants you to make the following changes to the UI: give the relevant service provider information only, and then configure the on-screen content to accommodate multiple screen sizes. Format the list of providers to display in a non-tabular form by using a layout to organize the presentation of a single item and then embedding the Section in a Repeating dynamic layout.
The following table provides the credentials you need to complete the challenge:
Role | User name | Password |
---|---|---|
Application Developer | author@gogoroad | pega123! |
Note: Your practice environment may support the completion of multiple challenges. As a result, the configuration shown in the challenge walkthrough may not match your environment exactly.
Challenge Walkthrough
Detailed Tasks
1 Create the Providers list View
- In the Pega instance for the challenge, enter the following credentials:
- In the User name field, enter author@gogoroad.
- In the Password field, enter pega123!.
- In the navigation pane of Dev Studio, click Data types > Service provider to open the Service provider data type.
- Click the Views tab.
- Click Create new View to create a new View.
- In the upper left of the New View window, click New View to edit the View name.
- Enter Providers list to rename the View.
- In the left pane of the window, click Fields.
- Hover over the Name field, and then click Add to View.
- In the Options list, select Read-only.
- Repeat step 8 to add the Address field.
- Click Submit to close the window.
- In the upper-right corner, click Save to save the Providers list View.
2 Create a responsive View
- In the navigation pane of Dev Studio, click App to open App Explorer.
- In the search field, enter or select GoGo-GoGoRoad-Data-ServiceProvider, and then press the Enter key to display the Rules within the specified class.
- Expand User Interface > Section.
- Right-click Section, and then click Create.
- In the Create Section form, in the Label field, enter Providers List Responsive to name the Section.
- In the upper-right corner, click Create and open to create the Section.
- In the Providers List Responsive Section, in the right pane, click Change to change the template.
- In the Select a template window, click Inline wrapping.
- In the right pane, click the Add icon to add a control.
- In the Add list, click Action > Button to add the button control.
- In the right pane, hover over the Button control, and then click Edit this "Button".
- In the Cell Properties window, in the Text field, enter Select provider.
- Click Submit to dismiss the window.
- In the right pane, click the Add icon.
- In the Add list, click Data display > Embedded Section. The Section Include Modal dialog box is displayed.
- In the Section Include Modal dialog box, in the Section field, enter or select ProvidersList.
- Click Submit to dismiss the dialog box.
- In the upper-right corner, click Save to save the responsive view.
3 Add the newly-created View to your application
- Create a new Assistance Request Case, and then advance to the Select service provider Step.
Tip: Not all locations have nearby service providers. In the Identify location Step, in the State field, enter MA to display a list of service providers in Massachusetts, USA.
- In the bottom-right corner, on the Developer Toolbar, click Live UI.
- In the Assistance Request Case, click the Service provider Section.
Tip: You can open UI Section Rules by using the Live UI tool or from the App or Data Explorer. Live UI is best applied for Sections that are actively used in the Case Type.
- In the right pane, to the right of SelectServiceProvider_ServiceProvider, click Open in Dev Studio to open the Section Rule in Dev Studio.
- In the Section Rule, click Structural, and then click and drag a Repeating dynamic layout to the Service provider Section, following the Service provider table.
- In the Repeating dynamic layout header, click View properties.
- In the Repeating dynamic layout properties window, in the List/Group field, enter or select .ServiceProvider.
- Click Submit to dismiss the window.
- In App Explorer, click Options > Refresh App Explorer.
- Expand User Interface > Section.
- Drag and drop the ProvidersListResponsive Section from App Explorer to the Repeating dynamic layout.
- In the upper-right corner, click Save to save the changes to the Section.
Note: Only the Repeating dynamic layout or the table is needed to show providers. Leave both for comparison.
Confirm your work
- Return to the Assistance Request Case instance that you created.
- In the upper-right corner, click Actions > Refresh.
- In the To do Section, click Go to return to the Select service provider View.
- Confirm that the updated Section is displayed.
This Challenge is to practice what you learned in the following Module:
Available in the following missions:
If you are having problems with your training, please review the Pega Academy Support FAQs.
Want to help us improve this content?