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

Audit note field value displays extra spaces



When using the CaptionLookup control with parameters included in a field value, the parameters and field value are passed to the function getLocalizedText which generates a localized string. When this string is displayed in an editable text area control, the parameters have a number of extra space characters added to them.

Example field value with parameters (included in the curly {} brackets):

Extra spaces seen at run time:

Error Messages

Not Applicable

Steps to Reproduce

  1.  Add the CaptionLookup control to parameter references in a field value
  2. Set pyNote with a data transform step which calls getLocalizedText and references the field value
  3. Ensure that the getLocalizedText function is provided parameters which match the parameters in the field value (see pySetNoteTransfer data transform and assignmentTransfer field value for an example)
  4. Display the pyNote in an editable text area (example section: pyTransferAssignment)

Root Cause

A defect in Pegasystems’ code causes the generated Java for the CaptionLookup control to be incorrect.
By default, the source for CaptionLookup is formatted to be human-readable (with line-breaks and extra spaces):

Even though the “Omit Extra Spaces” option is checked, the generated Java includes lines generated by the line-breaks and extra spaces:

The left side in the above image is the generated Java for the above example of CaptionLookup, while the right side is generated from a version which has had all human-readable formatting removed.


Perform the following local-change:
  1. Create a new custom control and configure its settings to match CaptionLookup
  2. Copy and paste the source from CaptionLookup into the new custom control
  3. Remove any line-breaks or extra spaces from between the angle bracketed elements of CaptionLookup:

  4. Reference the new control in the field value in-place of CaptionLookup

Published April 29, 2016 - Updated October 8, 2020

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