Support Article
Decision table with string function displays incorrect result
SA-51270
Summary
Decision table configured with 'contains' string function displays incorrect result.
Error Messages
Test compilation failed:
Error in Rule_Declare-DecisionTable
ClipboardPorperty ColVar1_circum0=0
Property for this column of the table : Invalid expression or reference: line 1:69 missinf '>' at '-'
Steps to Reproduce
- Create a decision table.
- Assign a condition column property for an 'if' clause as @(Pega-RULES:String).contains(TestPage.Test, <current-value>).
- Assign return values.
- Run the table.
Root Cause
The condition column property is compared with the result of the 'contains' function. Additionally, using <current-value> in the expression builder displays the error while saving the rule.
Resolution
Perform either of the following local-changes:
- Compare @(Pega-RULES:String).equals("true","true") (this evaluates to true always) column level property with the below row level condition.
@(Pega-RULES:String).contains(TestPage.Test, "<String>")
- Compare @(Pega-RulesEngine:String).pxContainsViaRegex(TestPage.Test, <current-value>, true) column level property with "<String>" row level conditions.
Published August 29, 2018 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.