Support Article
Used format does not work in reports
SA-81418
Summary
For properties with technical codes (for example, property = Symptom, value = 100), 'field value' table type with a reference class and field name are used. These field values contain functional values (for example, 100 = Damaged).
In a Correspondence fragment, a non out-of-the-box format is used to display the functional value. When using the same format in a report, the format does not work.
In the layouts, this works when using the localized field option.
Error Messages
Not Applicable
Steps to Reproduce
- Create a property with field value reference (property definition).
- Create a report using the property in the select list.
- Use the format (format definition) on the property or column.
- Run the report.
Root Cause
An issue in the custom application code or rules.
Pega does not support localization with field values.
Resolution
Perform the following local-change:
Add the customized code as a new format:
<%
String localizedLabel = pega_rules_utilities.lookup(
"pyLocalizedValue", "Rule-Obj-FieldValue", "pyFieldName",
pega_rules_utilities.lookup("pyFieldName","Rule-Obj-Property" ,"pyPropertyName",tools.getActive().getName(),tools.getActive().getParentPage().getClassName()), "pyFieldValue", tools.getActiveValue(),
pega_rules_utilities.lookup("pyFieldClass","Rule-Obj-Property" ,"pyPropertyName",tools.getActive().getName(),tools.getActive().getParentPage().getClassName()),
"", "true");
%>
<%=localizedLabel%>
Published August 19, 2019 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.