Am trying to clean up a PreferredName userProfileLookUp using the “Replace” runtime function in a calculated value control.
The PreferredName comes in like Joe Smith (CompanyIdentifier - 6) where the content between the parenthesis can change. I want to just end up with Joe Smith.
In a workflow, I use the Regular Expression action to Replace the text with nothing. The regular expression match I use is:
\(([^)]+)\)
Works flawlessly. But when I use the same regular expression in a calculated value:
replace(userProfileLookup(Current User,"PreferredName"),"\(([^)]+)\)","")
I end up with ) instead of Joe Smith
Any suggestions on why the regular expression would be different?
FYI - trying to avoid using JS on form if at all possible to enhance down the road support.
Best answer by Jake
View original