0

I have a repeating section that displays an URL on an infopath form built from a list. Currently it displays URL with the spaces in it. I want to replace those spaces with a %20 to make them link correctly. I am currently using the below function to get it correct myURL = concat(substring-before(myURL, " "), "%20", substring-after(myURL, " ")) but unfortunately this doesn't work for links with multiple spaces that need replaced.

e.g.

"http://google.com/ apples and oranges.aspx"

is changed to

"http://google.com/%20apples and oranges.aspx"

but i need it to be "https://google.com/%20apples%20and%20oranges.aspx."

Help me out in this .Thanks in advance.

1

Just got it other way.Since I am using a repeated table and the default hyperlink option given by the table I have deleted them and added the new hyperlink control and in data source i given the secondary data connection which I have created earlier to pull the urls. It brought all the urls as it is without any issues. Thanks.. :-)

0

Substring will just match on the first instance not find all occurrences. Try a translate function instead. =translate(myURL, ' ', '%20');

  • I have tried the translate function but not working as required. Any other catch? Thank you. – SPLearner Mar 27 '14 at 16:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.