How to replace "space" in string to "%20"

I was building the attachment URL as per example on

Nintex Workflow - Get Attachment Urls UDA - Vadim Tabakman 

I successfully build the string of the URL.

But, the problem occur, when the attachment name have multiple space. e.g.: "abc<space><space>def.txt"

This will cause generated URL "https:\\blahblahblah\bla\bla\bla\abc  def.txt" broken or unable access by the broswer.

The proper URL should be "https:\\blahblahblah\bla\bla\bla\abc%20%20def.txt".

How can I replace the <space> to %20 in O365 nintex workflow string? Since you can't put <space> in the replace string action?

Any idea?

0 Kudos
1 Reply

Re: How to replace "space" in string to "%20"

How about using a Regular Expression workflow action?

\s (any white space character) to be replaced with %20?

When configuring the Regular Expression workflow action, it would be as follows:

Pattern: \s

Operation: Replace text

Replacement text: %20

Input text: if variable or column that is used to store the URL value

Store result in: vartxtURLvariable