When doing a userProfileLookup, it returns the user's phone number as 618XXXXXXX. How is it then, that the function below replaces "618" with "+(08)"? Why is it adding a + symbol?
replace(userProfileLookup(RequestingOfficer, "WorkPhone"), "618", "(08) ")
Solved! Go to Solution.
Hi,
Not exactly sure why it would be adding a + but I think the parentheses are affecting the function.
Using {TextStart} and {TextEnd} in the function may resolve the issue.
replace(userProfileLookup(RequestingOfficer, "WorkPhone"), "618", "{TextStart}(08){TextEnd} ")
Parenthesis are not the issue, and while using {TextStart}/{TextEnd} has worked for me before in Workflow, it's Forms I'm referring to here, and it doesn't work.
I tried a double replace as well, no luck
replace(replace(userProfileLookup(RequestingOfficer, "WorkPhone"), "618", " 08"), "+", "")
Hi
I tested the rule
replace(userProfileLookup(Current User, "WorkPhone"),618,"(08)")
and it behaved as expected.
are you sure the returned phone number is 618XXXXXXX and not +618XXXXXXX?
Hi,
I made a quick video.
It shows a Calcualted value control with the formula I suggested to you.
It shows a Calculated value control that just returns the phone number so that you can see what the phone number is before it is put through the replace runtime function.
It shows the users profile with the phone number.
I am using SharePoint 2016 with the latest build of Nintex forms.
Not in my case, it still brings up the + symbol. Never mind, I've replaced 618 with a null value and hardcoded (08) instead.
As you can see the calculated value is returning a value without the plus symbol.