Close popover
Harsha Vardhan (HarshaV7)
HarshaV7 Member since 2017 2 posts
Posted: March 5, 2020
Last activity: March 5, 2020

How to pass a localized parameter to a parameterized message rule in a validate rule.

Hi All,

We have a validate rule in which we are throwing an error message on a property with the help of a parameterized message rule when the validation conditions fail as shown here.

Selected\tEach Option

Where Selected is a message rule of category 'Error' having the message 'should be selected'.We have a requirement that we need to localize the error message in French. I have a created pyCaption field value for the 'Each Option' in localization ruleset and also created the localized message rule in localization ruleset. Used the below logic to pass to localize the message rule in validate rule.

Selected\t@(PegaRULES:Utilities).getLocalizedText('Each Option', 'pyCaption', tools)

It didn't work. It's picking the message in the localized message rule 'Selected' but not the content from the localized field value of 'Each Option' of type 'pycaption' and showing the error message like below.

Each option devrait être sélectionné 

I've tried using the below logics without = also before the function.

Selected\t=@(PegaRULES:Utilities).getLocalizedText('Each Option', 'pyCaption', tools) Selected\t=@(PegaRULES:Utilities).getLocalizedText(Each Option, pyCaption, tools) Selected\t=@(PegaRULES:Utilities).getLocalizedText('Each Option', .pyCaption, tools) Selected\t=@(PegaRULES:Utilities).getLocalizedText(Each Option, '.pyCaption', tools) Selected\t=@(PegaRULES:Utilities).getLocalizedText("Each Option", .pyCaption, tools) -- Here it throws an error while saving the validation rule as it is not accepting the "", unlike in an activity or in a DT it accepts the "".

Please help on this issue.

Pega Platform 8.3 Enterprise Application Development Dev/Designer Studio Manufacturing Senior System Architect
Moderation Team has archived post,
Close popover This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.