Determine a certain string value within a property
Hi everybody,
i guess i need some Support in case of ignorance
There is a property which could have different string values. So I want to check this property if it contains the string value "prof" or "des"! If this is the case the property should be rewritten with "prof" or "des".
Example:
Property Value origin :"Major Srgt PD Professor med"
Property new Value: "Prof."
I checked the Expression builder and the String(Pega-Rules) library. I found a function called "contains" which returns only true and false. Is there a possibility to check the string and change the value within one function?
Thank you and best regards
Hi Norman,
Will the following expression helps @if(@String.contains(Param.Test,"Prof"),"Prof",Param.Test)
Here Param.Test is the property which holds the value.
Please let me know if this helps?.
Thanks,
Gowrishankar