Attachment url from secondary source has spaces instead of %20 - InfoPath Dev
in

InfoPath Dev

Attachment url from secondary source has spaces instead of %20

Last post 04-23-2015 06:24 AM by GwenW. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 04-20-2015 07:26 PM

    Attachment url from secondary source has spaces instead of %20

    Hi,

     I have an InfoPath 2010 form that has a secondary source that is a list. I am displaying the  list item attachment links (attachmentURL in a repeating table on the form). The issue is that the attachment url has spaces instead of %20s in the path.

    When viewing the url in SharePoint - edit item of the list - the attachment url has %20s ( as seen here http://enet/New%20Product%20Development/Lists/Lab%20Test%20Request%20Summary/Attachments/6/Lab%20Test%20Results%20Sample.docx)

    However, in the web browser form, the link shortcut has spaces - (as seen here http://enet/New Product Development/Lists/Lab Test Request Summary/Attachments/6/Lab Test Results Sample.docx). In Filler, you can still click the attachment link, and it translates the spaces into %20 when the attachment opens via the browser. However, in the browser version of the form, the spaces remain, and you get a "web page can't be found" error.

    Any thoughts on how to fix? 

    I think this is similar to this post: http://www.infopathdev.com/forums/p/27619/95613.aspx#95613 however, a solution wasn't listed...

    Thanks!

    Gwen

  • 04-21-2015 12:04 PM In reply to

    Re: Attachment url from secondary source has spaces instead of %20

    Hello Gwen,

    How about adding a Fx to your link with the function translate(field, ' ', '%20')  ?

    You can add a rule to the repeating control. And, it should fire when the secondary data source gets loaded. Just go to the data source, select the repeating group in your data fields and add the rule there. You could simply add the rule to the link and have it replace, but be careful because it will continue firing so you'll need to set some other condition so that it only fires once.

    Hope this helps. Thanks!

    - Prachi 

  • 04-23-2015 06:24 AM In reply to

    Re: Attachment url from secondary source has spaces instead of %20

    Hi Prachi, thanks for the suggestion. I had actually already tried this, and although it worked to put the %20 back in place of the spaces, for some reason the link wouldn't work. When you clicked it, nothing happened (and it was set up as a hyperlink type). However, I did try the encode qrules command and this did the trick.

    thanks!

    Gwen

Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.