I’ve analyzed your problem statement and generated a solution. Kindly try it and let me know the result whether it works or not.
First of all, I predicted your scenario that you created a Period field value rule under Code-Pega-List class for the pyCaption field with the To value of Periode and execute the particular report definition rule either from the Case Manager Dashboard specifically Reports navigation rule item or directly from Designer Studio in order to test it.
Field value you created reflected to “Filter by: ” header part of the rendered UI. Because, this part is under Code-Pega-List class context and the value is set by tools.getLocalizedTextForString function getting from pyCaption field’s value. You may check RRFilters_Logic control rule in case you are willing to dive into more details.
When end user clicks the link of the filter, pop up which allows end user to edit filter details rendered on the UI and it is under different class context so that your field value is not reflected on there. Kindly follow the steps below in order to provide a solution.
1. Save as your field value rule to Embed-ReportFilter class for the pyFilterUICaption field.
2. We are going to apply a slight change on rule whose availability is configured as final and connected with Pega-Reporting ruleset. In case pega platform is not allowing you to save as this rule to your ruleset by applying some validation, kindly private edit CheckAvailability activity rule and comment out first step and if another validation thrown after saving CheckAvailability activity rule, un check “Allow invocation from browser” and save it. After lifting those blockers now it is time for saving as CL: Embed-ReportFilter ID: pzEditSingleFilter section rule to your ruleset.
3. After you take the pzEditSingleFilter section rule in your ruleset and checkout, click gear icon of Filter Caption text input then click Change link in order to change control by clicking Custom → Other and choose GetLocalizedValue control eventually submit and check in the rule.
I had a pyCaption in @baseclass for Period, but let’s give this solution a go! Thanks for the extensive analysis, it would be great if this worked so we can prevent creating not dynamic field values.
*-*Okay that’s fine as well. Field value you created reflected to “Filter by: ” because Code-Pega-List class’ inheritance (@baseClass-Code-Pega-List). Field value rule is going to be picked from @baseClass. We can also have this field value directly under pxObjClass of page’s extended (top level) classes to be able to increase the range and reusability just like you did it by applying FV under @baseClass.
-Similarly, if you save as your field value for pyFilterUICaption under @baseClass, field value will reflect to edit filter pop up’s Filter Caption field part as well because of the Embed-ReportFilter class’ inheritance (@baseClass-Embed-…)
I decided to keep pyFilterUICaption field’s value directly under Embed-ReportFilter class because I only wanted to reflect my field value to page context whose pxObjClass value is Embed-ReportFilter only to not affect other parts. We can keep it under @baseclass to affect everywhere in case value always constant like Periode.