QRULES removes %20 from URL when it copies it... leaves the URL with spaces instead - InfoPath Dev
in

InfoPath Dev

QRULES removes %20 from URL when it copies it... leaves the URL with spaces instead

Last post 02-03-2014 08:32 AM by geronimo76. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 02-01-2014 07:22 AM

    QRULES removes %20 from URL when it copies it... leaves the URL with spaces instead

    I have an InfoPath form with QRULES. it is an expense report form.  it loads the items in a section above- you click the button beside each item you want to add it and it fires off rules to add the values to fields below. when it is first loaded and you can see the items from which to choose, their is a URL field for the attachment. the hyper link works. it looks like this:

    https://mysharepointsite/Accounting/documentation/Lists/Expense%20Receipts/Attachments/302/01-22-2014%20122621.jpg

    here is the command that runs when the button is pressed:

    concat("SetValue /xpath=/my:myFields/my:receipts/my:Receipt[", count(xdXDocument:get-DOM()/my:myFields/my:receipts/my:Receipt), "]/my:Link /value=", d:Attachments/attachmentURL)

    here is the result when its added to the below section:

    https://mysharepointsite/Accounting/documentation/Lists/Expense Receipts/Attachments/302/01-22-2014 122621.jpg   (SPACES !!)

    it has spaces rather than %20.

    HOW do I get the QRULES command to the correct ULR in the field below when it runs??

  • 02-02-2014 10:56 AM In reply to

    Re: QRULES removes %20 from URL when it copies it... leaves the URL with spaces instead

    Thanks for your post.

    qRules has an encode command and that may be what you want. I'm going to ask Jimmy to respond with more details.

    Patrick Halstead
    Project Manager at Qdabra
  • 02-02-2014 11:58 AM In reply to

    Re: QRULES removes %20 from URL when it copies it... leaves the URL with spaces instead

    Wonderful. Looking forward to it. Thanks a million.
  • 02-02-2014 09:14 PM In reply to

    Re: QRULES removes %20 from URL when it copies it... leaves the URL with spaces instead

     Hello geronimo,

         I am fairly certain that there is nothing in qRules that would be replacing the %20s with spaces. The SetValue command simply copies the values as-is without modifying them (I have also verified this in a test form just now). So I have to suspect that your original URL values already have spaces in them.

    A few questions:

     - How are you querying this data into the form?

     - Have you displayed the original values in the form and verified that they actually contain %20s?

     - Are the spaces in the copied URL causing a problem for you?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 02-03-2014 06:39 AM In reply to

    Re: QRULES removes %20 from URL when it copies it... leaves the URL with spaces instead

    - How are you querying this data into the form?   here is a pic:

     - Have you displayed the original values in the form and verified that they actually contain %20s?  - yes

     - Are the spaces in the copied URL causing a problem for you?  yes  the page comes up as "about blank" it doesn't show the image.

     

    here is my form. you can see that before I run the command - it works (it has the proper %20 formatting)    once I run the command, it is added below and has spaces.

  • 02-03-2014 08:32 AM In reply to

    Re: QRULES removes %20 from URL when it copies it... leaves the URL with spaces instead

     Jimmy,

    maybe I am missing something. I would love to do a quick screen share. I can send a gotomeeting invite. if so, you can email [email protected]

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