Using concat-substring function to replace space in URL control - InfoPath Dev
in

InfoPath Dev

Using concat-substring function to replace space in URL control

Last post 01-27-2014 01:22 PM by jacinta. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 01-21-2014 04:16 PM

    Using concat-substring function to replace space in URL control

    I'm having an issue already discussed in numerous posts, but am having a strange result when implementing the often suggested solution and am hoping someone can tell me what I'm doing wrong. 

     I'm trying to link to a document on our shared drive from within an InfoPath browser form.  The link works beautifully when clicked on from directly within the column of the list, but when clicking on it from within the form I get an error that the path cannot be found.  The reason clearly is because, when clicking on the link from within the form, the spaces aren't being replaced with %20 as is automatically done in Sharepoint.

    I set a rule on the URL field to run when myURL contains " ".  Then, I set the value for myURL to: 

    concat(substring-before(myURL, " "), "%20", substring-after(myURL, " "))

    This is working well to replace all the spaces; however, it's replacing the spaces with %2520 rather than %20. I can't figure out where the extra numbers are coming from. Any ideas on what I'm doing wrong are greatly appreciated.

  • 01-27-2014 01:15 PM In reply to

    Re: Using concat-substring function to replace space in URL control

     Hi Jacinta,

    Try using Translate function like this: translate(myURL," ","%20"). It would replace all space with %20. Hope it works out.

  • 01-27-2014 01:22 PM In reply to

    Re: Using concat-substring function to replace space in URL control

    Thanks, kapil.  However, I tried that already and the translate function only replaces one-to-one, so only the % gets dropped into where the space is. 
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.