Pega - Upgrading DynamicSelect to Dropdown


Upgrading DynamicSelect to Dropdown:
We can be able to upgrade deprecated control DynamicSelect to Dropdown:
We have few challenges.
Different sources for dynamic Select-control:
·         Report Definition
·         List View
·         Clipboard Page.
·         Activity
·         Advanced.

As per the code provided by Pega to convert Deprecated Dynamic select to Dropdown:
·         We can only able to convert if the source type is either Clipboard Page or Report Definition.
·         If the Source is Activity or Listview, we cannot convert DSS to the dropdown. Below is the Datatransform rule “RULE-OBJ-MODEL EMBED-DISPLAY-TABLE-CELL PXDYNAMICSELECTCONVERTE”


Step-1: When
.pyHTMLParams.firstRadio!="useActivityDiv" && .pyHTMLParams.firstRadio!="useListviewDiv"  &&  .pyHTMLParams.firstRadio!="useAdvancedDiv"
So, we need to change the Data transform to accept all the sources and it will execute all the below conditions to change DSS to Dropdown.
After modifying the rule (When), We can be able to convert DSS to the dropdown.
The default value for the drop-down property will set as “As defined by the property”.
Before Conversion:

After Conversion:


Now we need to think about the source for the Dropdown property after conversion:
I.        If the source is Report Definition
After Conversion, we can still use the same RD as the source by adding some logic in data transform.
II.      If the source is Activity
·         We can still use the same activity but we need to comment on the Show-Page method in the activity before referencing (Sandeep will provide more details on this)
·         How can we do this?
III.    If the source is List View
·         After conversion, we must use RD as a source.
·         In this case, we should have an RD for this list view in place to use as a source for dropdown.
IV.    If the source is Advanced
·         Where we can use Activity as defined in Custom code below.
·         "pyActivity=Rule-Obj-ListView.ShowViewAsXML&ViewClass=PegaMock-Data-Locations&ViewOwner=ALL&ViewPurpose=DataTableClassEditor&pyAction=Prepare&ViewHeader=0"
·         Need to comment on the Show-Page method and if we are using List-view in the source then need to convert it into RD.


Why upgrade this control at all?

DynamicSelect is a deprecated control. Newer versions of Pega give you a warning wherever it is used, and it is not supported in the newer UI. Dropdown is the modern replacement and works properly with the responsive layouts.

Checklist for a conversion project

  1. List every property that uses DynamicSelect, and note its source: Report Definition, clipboard page, activity, list view or advanced.
  2. Convert the Report Definition and clipboard page sources first, since the conversion utility handles those.
  3. For activity and list view sources, replace them with a data page and a Dropdown that reads it, or adjust the conversion rule as described above.
  4. Check that the default value option is what you expect after conversion.
  5. Retest each screen: options list, the selected value, and behaviour on submit.

A worked example

A bank's account-opening form has a Branch DynamicSelect fed by an activity that builds a page list. During the upgrade, the team replaces the activity with a list data page D_BranchList, and sets the Dropdown property to use that data page. The branch list now loads once, is cached, and no longer needs the activity or the Show-Page step that used to support the old control.

Tips

  • Take a backup of the rule before running any conversion.
  • Do the conversion in a lower environment first and compare screens before and after.
  • Track progress with the list of rules that still show the deprecation warning.

Related: The post upgrade fixing process and the Upgrade label.

No comments:

Post a Comment