Question

1
Replies
187
Views
Harsha Vardhan (HarshaV7)
AtoS
SSE
AtoS
IN
HarshaV7 Member since 2017 2 posts
AtoS
Posted: March 5, 2020
Last activity: March 5, 2020
Posted: 5 Mar 2020 5:16 EST
Last activity: 5 Mar 2020 6:21 EST
Closed

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.

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, 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.