LuckyMcG
Design Dabbler

Build String Hyperlink Doesn't Include Spaces

Jump to solution

Hello!
I'm having an issue where I used Build String to create a hyperlink to the current item ID in my workflow. I have my result stored in a variable named "CurrentItem" which works somewhat when inserted into a notification, but it is missing the appropriate characters to include spaces in the hyperlink. If I add in %20 for all the spots where a space would normally be the link works fine. How do I make this happen in the Build String action?

0 Kudos
Reply
5 Replies
v-tmasenko
Design Canvas Artiste

Re: Build String Hyperlink Doesn't Include Spaces

Jump to solution
I suggest using the Build String action first.
Then use Replace Substring In String action to search for a space and replace it with %20 in your string to make a usable hyperlink
Reply
LuckyMcG
Design Dabbler

Re: Build String Hyperlink Doesn't Include Spaces

Jump to solution

V,
I have the build string action first, I was testing the link after it was generated, sorry for the confusion! But is the Replace Substring In String action available in only a specific version of Nintex? I'm in 2013 and I don't have that tool, which would make my life a lot easier.

0 Kudos
Reply
SimonMuntz
Nintex Employee
Nintex Employee

Re: Build String Hyperlink Doesn't Include Spaces

Jump to solution

Hi,

The replace substring in string action is an Office 365 action and that is why you do not see it in Sharepoint 2013. 

 

I would use a regular expression action to replace the spaces with %20. 

The regular expression for a space is \s. 

URLencode.png

View solution in original post

Reply
LuckyMcG
Design Dabbler

Re: Build String Hyperlink Doesn't Include Spaces

Jump to solution

This worked flawlessly once again. Thanks SimonMuntz!

0 Kudos
Reply
LuckyMcG
Design Dabbler

Re: Build String Hyperlink Doesn't Include Spaces

Jump to solution

In addition to SimonMuntz's solution, I didn't realize I could use "Context Item URL" reference and it would reference the item that the workflow is run on. So anyone reading this thread for their own solution, this might condense your workflow and make it a little easier if you don't have multiple items you need to link to.

Reply