cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
furstlars
Nintex Newbie

Why is the Replace Function Producing a "+" Symbol?

Jump to solution

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) ")

2019-07-05_9-03-40.jpg

Labels: (1)
0 Kudos
Reply
7 Replies
Nintex Employee
Nintex Employee

Re: Why is the Replace Function Producing a "+" Symbol?

Jump 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} ")

0 Kudos
Reply
furstlars
Nintex Newbie

Re: Why is the Replace Function Producing a "+" Symbol?

Jump to solution

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"), "+", "")

1.jpg 

0 Kudos
Reply
Nintex Employee
Nintex Employee

Re: Why is the Replace Function Producing a "+" Symbol?

Jump to solution

Hi

I tested the rule

replace(userProfileLookup(Current User, "WorkPhone"),618,"(08)")

and it behaved as expected.

 

0 Kudos
Reply
mlauer
Nintex Newbie

Re: Why is the Replace Function Producing a "+" Symbol?

Jump to solution

are you sure the returned phone number is 618XXXXXXX and not +618XXXXXXX?

0 Kudos
Reply
Nintex Employee
Nintex Employee

Re: Why is the Replace Function Producing a "+" Symbol?

Jump to solution

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.

0 Kudos
Reply
furstlars
Nintex Newbie

Re: Why is the Replace Function Producing a "+" Symbol?

Jump to solution

Not in my case, it still brings up the + symbol. Never mind, I've replaced 618 with a null value and hardcoded (08) instead.

View solution in original post

0 Kudos
Reply
furstlars
Nintex Newbie

Re: Why is the Replace Function Producing a "+" Symbol?

Jump to solution

As you can see the calculated value is returning a value without the plus symbol.

 

1.jpg

0 Kudos
Reply