PGP Option Map

From PegaWiki
Driving Pega UI Picker Controls with Live Data / This is the approved revision of this page, as well as being the most recent.
Jump to navigation Jump to search

PGP Option Map

Description Driving UI with Local Data
Version as of 8.5
Application Pega Government Platform
Capability/Industry Area Government

PGP Option Map feature


The PGP Option Map is a pattern for supplying customizable, configurable data collections to Pega Picker user interface selection controls like pxAutoComplete and pxDropdown (drop-down list). The following are the benefits of this pattern:

  • Instances can be managed from App Studio using the Data Type Record Editor in support of the low-code/no-code developer.
  • Value display order can be explicitly controlled (not just alphabetical).
  • The solution scales from a few instances to thousands of instances.
  • The solution is localizable.
  • The data instances are supplied by a parameterized data page can be used as a source in many data driven use cases.
  • The data page is loaded by a data transform that may be customized in an implementation layer.


The Option Map consists of three basic elements.

  • A Pega local data type that holds the collections of name-value pairs grouped by field name group.
  • An interface to manage the OptionMap data instances.
  • A data page to retrieve collections of name-value pairs based on parameters.

Data Type Definition

PegaPS-Data-Config-OptionMap Data Type
Label Property Description
ID .pyID Unique Instance ID
Display Value .pyLabel Display Name
Code .Code Value
Display Order .DisplayOrder Integer index
Field Name / Group .Purpose Field Group (Category)

Option Map Data Management

The OptionMap data type is created under Pega's local Data Type Wizard and can fully leverage the App Studio Data Designer for instance management and record editing.


D_OptionMapList Data Page

The D_OptionMapList is a Requestor scoped data page that takes two parameters.

  • FieldName (required) which supplies the label common to a collection of OptionMap instances.
  • Code (optional) which may be provided in special circumstances to retrieve a specific OptionMap instance.

LoadOptionMapList Data Transform

The D_OptionMapList data page is populated by the LoadOptionMapList data transform which may be superseded or overridden in an implementation layer should detailed control of the list be required..

Using OptionMap Data in a Picker control

The OptionMap data can be utilized in a Pega UI picker control by configuring the List source to call the D_OptionMapList data page passing parameters to identify the field name/group that identifies the collection instances to be loaded.