UI Interface
UI Interface
Users interact with an application and perform tasks through user forms. A user form can be a
data entry form in which users provide information for filing an insurance claim, a display of the
legal terms and conditions users must accept before opening a bank account, or a list of bank
account transactions during the past month.
In Pega, you build user forms with sections. Sections group information and functionality by
context and purpose. Inside a section, you organize UI elements with layouts. Layouts contain
rows and columns, defining a set of cells. A cell can be empty or contain various fields and
controls.
When you create a view in the Dev Studio, you are using sections to build the view. By default,
the fields in the section are organized into a layout that contains a single column. When you
add an embedded field such as a field group (list), the list properties are organized into their
own section.
The following image shows several types of layouts. Different layouts arrange UI elements in
different fashions. A column layout arranges items in a set number of columns.
Structurally, a section consists of one or more layouts and embedded sections. These sections
enable you to logically group elements and reuse them in other layouts. The following image
shows an example of a two-column template that contains embedded sections and a field.
Guidelines for designing user views:
The user interface (UI) is the user's view of the application. To be effective, a UI must meet the
user's needs and be easy to use. A well-designed UI provides a better understanding of what
the application delivers. Consider the following guidelines when planning a user view.
Design an Intent driven UI:
Provide users with information when they need it. An intent-driven UI shows users what they
need to know to perform a task. The following view of a shopping cart for an online order is an
example of an intent-driven UI. The shopping cart review UI displays only relevant information,
such as the intended items and the number and price of each item.
Options such as changing the billing address are not relevant in this step. Making an address
change could distract the user from the shopping cart.
Users spend less time searching for relevant information when the intent is the focus of each
case life cycle step.
Design a model driven UI:
Align the user view with the case life cycle to ensure the user interface is model-driven. The
following image of a case life cycle shows each step. The requirements of each step dictate the
information in the view.
Minimize data elements to an optimal set that is critical to the task. Focus on what users are
trying to accomplish. Be aware of where users are in the life cycle and the next best action.
Users should not have to guess how to proceed while looking at a view.
Use common UI labels and elements:
Use common labels and elements in the application UI. Users are more comfortable and
complete tasks faster when views are consistent within an application.
The following views illustrate consistencies and inconsistencies within the application. The
major elements - the items, price, quantity, and the buttons - show consistency. They are in the
same location in both views. The delete function and name of button on the lower right side are
different. They show inconsistency which could potentially delay the person placing the order.
Create patterns in language, layout, and design to help users complete their tasks. Design
consistency enables users to recognize similar tasks in other application views.
When creating a user interface, a section can be configured through a user view using Pega.
However, certain configuration needs can only be satisfied by accessing and modifying the
section rule directly. For example, adding more than one layout can only be done on a section
rule. And if the section is not configured from the case life cycle, you need to create the section
manually.
In Dev Studio, you create sections from the Create menu, or by right-clicking the case type in
the Application Explorer and selecting the User Interface category and the Section rule type.
When you create a section, specify the following information:
Label – Used to identify the purpose of the section. The label is used to generate an identifier
for the record.
Class – The class to which the record is applied. The class determines the availability and re-
usability of the section.
Ruleset and version – The ruleset and version that contains the record. Pega defaults to the
highest unlocked application ruleset when you create a record.
You can also select Create Section using a Design Template. Use design templates to ensure
that the application UI is organized consistently and to simplify the organization of the section
and its maintenance. You can position the section contents by selecting a template and then
arranging the contents within the columns defined by the template.
As shown in the following example, you can apply a design template to organize fields into one
column, two columns of equal width, or two columns split 70/30 (one column is 70 percent of
the available width and the remaining column is 30 percent).
In App Studio, you can change the design template when running a case by clicking Configure
this view in the upper right corner of the form. In Dev Studio, you can change the design
template on the Design tab of the section rule.
Layouts:
A layout is a container that governs the positioning of fields. Section rules generally use two
types of layouts: dynamic layouts and repeating layouts.
Dynamic Layouts:
Dynamic layouts arrange items in a flexible form, automatically adjusting to screen size. When
the layout width exceeds the width of the screen, a dynamic layout responds by wrapping
controls to the next line. Wrapping eliminates the need for horizontal scrolling by users viewing
the form on smaller screens, such as mobile devices. Many Pega design templates are built with
dynamic layouts.
For example, in a section displaying healthcare coverage for employees, below the Dynamic
Layout, a section defined in another class is included. This included section contains a dynamic
layout that displays the coverage plan information.
In a dynamic layout, a single item is represented as tabular data. Item arrangement can be one
of two types: inline or inline-grid. The inline arrangement displays items in a row, like words in a
sentence. The inline-grid arrangement displays items in a multicolumn grid. The inline-grid with
one column is equivalent to a stacked format.
Several formats of dynamic layout styles are available, including Default, Stacked, Inline, Inline-
grid double, and Inline-grid triple. You can modify and create additional formats; however,
changing the format automatically affects all sections using that format.
Repeating layouts:
When you want to display a collection of data that belongs to a page list or a page group, you
use a repeating layout.
In a repeating layout, several configurations are available including Grid layout, Tree layout,
Tree Grid layout, Repeating dynamic layout, Column Repeat layout, and Tabbed Repeat layout.
Data represented in a linear table is a repeating layout.
However, a repeating dynamic layout is useful when you want to present content in a
nonlinear, more aesthetic format.
Repeating dynamic layouts help you create an interface for displaying data regardless of screen
size.
Controls:
After you create the section, add controls and map the controls to specific data elements. For
example, to book a listing, you can add a button. To set a True/False value, you can add a check
box. To enter a number, you can add a field. To set a date or time, you can add a calendar. For
each control, you can configure the presentation and add an action set as appropriate. The
following image shows a completed section with added controls mapped to data elements.
To configure the importance of a column, first click the circle above the column header.
Then, to the right of the column, select the Gear icon to open the Column Properties panel.
Finally, from the Importance drop-down, select the importance setting.
Introduction to adding dynamic content to user views:
In a dynamic user interface (UI), the UI content changes based on user interactions with the
content. These changes reduce the UI to the fields essential for greatest efficiency.
For example, while submitting a loan request, a bank's customers must state marital status. If
applicants select Married, the application displays user entry fields for the spouse or partner
name. Single applicants skip to the next step of the loan process, saving time and effort. The
following image illustrates two UIs. The UI on the left shows the Marital status in the default
state of Single. The UI on the right shows the Martial status set to Married, with additional
fields to enter partner information.
Using a dynamic UI has many benefits that lead to a more compelling and modern user
experience. Dynamic UI benefits include the following:
Real-time response to end-user behavior
Robust functionality available for most user interactions
Reduced visual clutter on the screen
Fewer full page refreshes, resulting in improved UI responsiveness
Dynamic behavior enables application developers to hide portions of the UI until those portions
are needed, and then expose them in response to some trigger, such as a property value falling
within an allowed range, or when the user clicks a button.
Pega Platform automatically creates a section rule for each user view. You configure dynamic
behavior in section rules. You can also create and edit sections manually to meet UI
requirements. For example, configuring a pop-up window to display more information when
users click a button.
Event Action Model:
When designing a dynamic UI, you use an event-action model. Think of event and action as a
cause-and-effect pair. For example, an online shopping cart that requires users' shipping and
billing addresses. Users can select a box to indicate that their shipping and billing addresses are
the same. The section for the billing address disappears when users select the box. In this case,
selecting the check box is the event, and hiding the billing address section is the action.
Two types of events exist: property-based events and user events.
Property-based events occur either when a data value changes or when a value meets specific
criteria.
A user event occurs when an end user takes some action on the page, such as selecting an
option or clicking on a link.
The following image provides examples of events and actions.
Categorizing events into two types simplifies the event-action concept. In practice, these two
event types often overlap. For example, when a user clicks a button (a user event), the action is
to set a property to a value. That action then triggers a property change event.
Controlling the fields displayed on screen removes less important and irrelevant elements. Pega
Platform provides the ability to control how fields display. You can configure field attributes for
dynamic display using Visibility, Disable, and Required settings. Setting options for all three
attributes are similar. The following table defines the settings and their functions.
Condition (when Uses a when rule to determine visibility; visible if the when rule Visibility, Disable,
rule) returns true Required
If not blank Visible if the value of that field is not blank Visibility for cell
properties
If not zero Visible if the value of that field is not zero Visibility for cell
Setting Definition Attributes
properties
You use visible when conditions to hide or display data fields based on a value entered by
users. In the following example, users select their marital status from a list in a form. Marital
status options are single, married, and divorced. Depending on the value entered in the Marital
Status field, additional fields may populate the form.
If the user selects Single, no additional fields are displayed.
If the user selects Married, the Date of Marriage and Name of Spouse fields are displayed.
The Reserve space when hidden option keeps the space surrounding the control open. This
prevents the UI elements on the screen from repositioning when the visible content is
displayed.
The Run visibility condition on client option is displayed when you use the If not blank, If not
zero, or Condition (expression) visibility options. When you select the Run visibility condition
on client option, the clipboard page includes all the possible data it can display. The application
uses the data on the page to refresh the section based on the visibility condition. If you do not
select this option, the client must communicate with the server to refresh the section. If the
hidden content is not likely to change during case processing, select Run visibility condition on
client. This reduces the number of server trips and avoids page refreshes.
For Disable conditions, the option Run disabled content on client provides the same benefit as
Run visibility condition on client for the Disable conditions.
Event Processing:
In Pega Platform, you use action sets to configure dynamic UI changes based on the event-
action model.
An action set consists of an event, an action, and (optionally) conditions.
Event – A trigger performed by users, such as clicking a button, hovering a pointer over a field,
or entering a value in a field.
Action – A response performed by the system as a result of the user event. For example, when
users click a button, the application creates a case.
Conditions – Restrictions such as when rules, which can be applied to an event and action
combination. For example, you can configure conditions so that hovering over a field displays a
smart tip message only if the field contains a property value.
Each action set requires at least one event and one action. For example, in an insurance claim
application, you want a text pop-up to display when users hover their pointer over the Date of
loss field explaining the purpose of that field.
The following image shows a smart tip pop-up on a Date of loss field.
You can also create multiple action sets for a single control or layout. Continuing the date of
loss example, depending on how long ago the loss occurred, you also want to change the
expected response time and a few date-related property values. When users change the value
of the date field, the change event triggers a data transform that sets the date-related property
values.
You can define action sets for a single control or an entire layout. In most cases, you define
action sets on controls. You configure action sets on the Actions tab of the control's Cell
Properties form. For layouts, configure action sets on the Actions tab of the Layout Properties
form.
Event Action
Press the Escape key on the keyboard Closes the assignment and returns to the home page
Select a value from the state drop-down Updates the list of counties
Identify and locate or create the section rule that corresponds to the user view you want to
configure.
Click Add an event to add one or more events to the action set, such as hovering, clicking, or
pressing a specific key.
Click Add an action to pair one or more actions to the event or events selected. For each action,
you configure the necessary parameters. You can also apply a when condition to determine
when to perform the action. For example, only certain service items in a list may need more
information from users. You can use a when condition to display a more information pop-up for
the types of service requiring additional information.
You use the Applicability drop-down list to configure whether the action set processes if the
control is displayed in read-only mode, editable mode, or both.