Closed
Convert text to Proper Case
We have a requirement to convert text to Proper case. Is there any OOTB function available in Pega 7.2.2?
This content is closed to future replies and is no longer being maintained or updated.
Links may no longer function. If you have a similar request, please write a new post.
We have a requirement to convert text to Proper case. Is there any OOTB function available in Pega 7.2.2?
Hello,
I don't think there is. What do you mean by Text? Is it a file entering the system? Or a Text property somewhere you need to parse?
Are you looking for converting text or text property to upper case or lower case? If yes, we have toUpperCase and toLowerCase functions. For example toUpperCase("test") will give you TEST.
I don't think this is what the client is looking for. This is what proper case looks like. However, I did not find any equivalent OOTB string function available for this.
OOTB function is not available for this. Please find the below article which might be helpful.
One more option that is not in the link above is to use a Text Normalize rule in an activity step.
1. Create the Parse Normalize rule and change the Conversion Options dropdown to "Convert To Proper Case." The other options can be left blank and the only change will be the conversion to Proper Case.
2. In the activity, add a Text-Normalize method step with the created Parse Normalize rule. The Name is the Parse Normalize rule name, the Source is the property that needs to have Proper/Camel case, and the Target property is only required if you want the formatted text in a different property than the source for record keeping purposes.
Spaces, punctuation, and numbers all count as separators for words and the first character of every word after a separator will be capitalized.
@DavidP_CSSA Thanks a lot. Works like a charm
Pega Collaboration Center has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.