Close popover
Abhishek Paul (AbhishekP2468)
Tech Mahindra

Tech Mahindra
AbhishekP2468 Member since 2016 6 posts
Tech Mahindra
Posted: February 27, 2018
Last activity: February 27, 2018

Can I evaluate an expression formed as string type in when rule


I have a Parameter of string type set in my Primary page which will contain some set of expression in string format which will be formed dynamically while the code gets executed. So for eg during execution based on some condition i'm setting the parameter to the following value:

Param.SearchCriteria = "@contains(.pyID,RS-239) && @equals(.pzInsKey,RS)"

Now I'm accessing this parameter from a when rule. Is there any such method in Pega using which I can dynamically evaluate the string expression passed to the when rule?

I tried with the following function but it's always returning true which should not be the case :

@CRPDecision.EvaluateExpression(Primary,"@contains(.pyID,239)") -- the SearchCriteria parameter will contain the string "@contains(.pyID,239)" actually.

Please help me out. It's urgent.

Thanks in advance.

Low-Code App Development Enterprise Application Development Dev/Designer Studio Data Integration Java and Activities
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.