Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Cannot modify Parse Normalize rules when performing rule Save As

SA-83824

Summary



Unable to modify the Parse Normalize rules when performing a Save As of the rule.


Error Messages



Not Applicable


Steps to Reproduce

  1. Save As an existing or create a new Parse Normalize rule.
  2. Add rows.
  3. Select the 'Whole Word and Ignore Case' and 'Text to Replace With' checkboxes.
  4. Check-In the rule.


Root Cause



In the earlier versions of the application, the Normalize rules had the two below properties in the Clipboard:
  1. pyReplaceList
  2. pySearchList
The pyReplaceList is the property which contains all the Search and Replace strings that are provided in the Normalize rule.

In the Clipboard, both the pyReplaceList and the pySearchList contain the same values.

When a Normalize rule is opened, the pyOpenUIDefaults activity is invoked. The pyOpenUIDefaults activity contains a JAVA step.

The activity is executed as below:

The activity checks if pySearchString is present in the Clipboard. If it is present, then the values in pySearchString are iterated and appended to the pyReplacelist property.
Since the pyReplaceList property already contains the same values, appending the pySearchList values to pyReplaceList values duplicates the entries. Hence, duplicate entries display in the UI.

The Clipboard structure is changed in the newer versions of the Pega application.

In the new Clipboard structure, the pySearchlist is absent in the Clipboard properties list.
Since there is a check in the pyOpenUIdefaults activity for the pySearchList, the pySearchList is checked if it is null (present). If the pySearchList is null, the entire activity execution is skipped. Hence, the appending of values to pyReplaceList is skipped. Since pyReplaceList already contains the required values on the Clipboard, Normalize rules are not duplicated and are displayed as required.



Resolution



Perform the following local-change: 

Include the below Validation condition (If condition) in the pyopenUIDefaults activity:


 Iterator iter = pySearchList.iterator();
   ClipboardProperty pyReplaceList = cp.getIfPresent("pyReplaceList");
// SR-D26322-start
  if(pyReplaceList==null){                                                                                 
// SR-D26322-end
   ClipboardPage rowDataPage = null;
     String searchString = "";
   while(iter.hasNext()) {
      ClipboardProperty sourceRowData = (ClipboardProperty) iter.next();
      rowDataPage = pyReplaceList.getPageValue(ClipboardProperty.LIST_APPEND);
      searchString = sourceRowData.getStringValue();
      rowDataPage.putString("pxObjClass", "Embed-Pega-SearchAndReplace");
      rowDataPage.putString("pySearchString", searchString);
      rowDataPage.putString("pyWholeWordOnly", wholeWordsOnlyElem);
      rowDataPage.putString("pyCaseInsensitive", ignoreCaseElem);
      rowDataPage.putString("pyReplaceString", replacementStringElem);
   }
// SR-D26322-start
  }                                                                                                                                 
// SR-D26322-end
}

Published August 17, 2019 - Updated December 2, 2021

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us