Question

2
Replies
2404
Views
AbhishekP2468 Member since 2016 6 posts
Tech Mahindra
Posted: 2 years ago
Last activity: 2 years 6 months ago
Closed

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

Hi,

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 Low-Code App Development Dev/Designer Studio Data Integration Java and Activities
Moderation Team has archived post
Share this page LinkedIn