how to concat or translate a whole string instead of a single char? - InfoPath Dev
in

InfoPath Dev

how to concat or translate a whole string instead of a single char?

Last post 06-14-2012 07:56 AM by Jimmy. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 06-14-2012 02:41 AM

    how to concat or translate a whole string instead of a single char?

     hi

     i have created a customized a form in infopath for sharepoint list.

     In that i have a used a link in which concats from the field and then merge it into the link to make the url.

     i want to set the URL.

    please help me how to make this string in formula.

    string : "InfoPath Form"

    required string : "InfoPath%20Form"

     how can i do this in formula? :(

    i tried to do this using traslate () in formula

    translate(""InfoPath Form"";" ";"%20")

    it does this : "InfoPath%Form"

     

    please guide me :(

     

    with regards,

    Luqman

     

  • 06-14-2012 06:25 AM In reply to

    Re: how to concat or translate a whole string instead of a single char?

    InfoPath doesn't provide a good way to do this, which is why we added it to qRules.  qRules' ReplaceString command can replace multicharacter parts of strings with other multicharacter parts (e.g. replacing " " with "%20"), but even better in your case would probably be the Encode command, which can URL encode the whole string, taking into account everything that needs to be encoded rather than just spaces.
    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 06-14-2012 06:27 AM In reply to

    Re: how to concat or translate a whole string instead of a single char?

     How about this?:

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

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 06-14-2012 07:02 AM In reply to

    Re: how to concat or translate a whole string instead of a single char?

     hmmmm

    what if we don't know how many spaces may appear in a string.

     

  • 06-14-2012 07:56 AM In reply to

    Re: how to concat or translate a whole string instead of a single char?

    As I've already said, InfoPath doesn't have a good built-in solution for that scenario.  The best suggestion I can give you is to give qRules a try.  Is your form a list-based form or a general-purpose form that interacts with a list?
    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.