Question

1
Replies
74
Views
HarshaV7 Member since 2017 2 posts
AtoS
Posted: 7 months ago
Last activity: 7 months 2 weeks ago

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 Low-Code App Development Dev/Designer Studio Manufacturing and High Technology Senior System Architect
Share this page LinkedIn