Convert user entry to Title Case - InfoPath Dev
in

InfoPath Dev

Convert user entry to Title Case

Last post 10-19-2012 08:20 AM by rcant. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 07-19-2010 12:03 PM

    Convert user entry to Title Case

    I've read through all the posts I can find but none of them seem to address my exact issue. Users enter a conference title into a field for submission to our database. Many times they either enter in all lowercase letters, or some random use of capitals that no one can explain. I'm looking for a way to convert their entry into title case. I've tried manipulating the concat(translate(substring examples I have found here with no success. The most I've been able to accomplish is getting the first word to capitalize but none of the others.

    As an example, I'd want: united states conference on lung cancer to become United States Conference on Lung Cancer.

    Is there a way to do this?

  • 07-20-2010 05:17 AM In reply to

    Re: Convert user entry to Title Case

    I can imagine the following:

    1. Break up the title into pieces that are separated by spaces.

    2. Capitalize the first letter of each "piece" using the translate() function.

    3. Use concat() to put the title back together.

    I'm not sure if it'll work, but it's an idea. Good luck!

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


  • 06-14-2012 11:30 AM In reply to

    • fhall
    • Not Ranked
    • Joined on 06-14-2012
    • Posts 2

    Re: Convert user entry to Title Case

    I didn't find this solution (yet), but this was helpful:
    capitaize the first 2 words in a field.
    http://www.infopathdev.com/forums/p/18952/79502.aspx

    cheers,

  • 10-16-2012 12:33 PM In reply to

    • rcant
    • Top 500 Contributor
      Male
    • Joined on 03-24-2008
    • Rochester
    • Posts 27

    Re: Convert user entry to Title Case

    ANy able to figure out a solution to this?

     I have been battling using the concat(translate(substring......

     and substring-before etc....

     but cannot get it to convert every word entered into the text box to be title case -- just the first and/or second word

     

     

    thanks

  • 10-16-2012 03:20 PM In reply to

    Re: Convert user entry to Title Case

    In case no one has a formulaic method for you - qRules has a command called "SetCase" that can do this, in case you are interested in 3rd party solution. I added that with a bunch of other string and math commands last release.
    Hilary Stoupa

  • 10-19-2012 08:20 AM In reply to

    • rcant
    • Top 500 Contributor
      Male
    • Joined on 03-24-2008
    • Rochester
    • Posts 27

    Re: Convert user entry to Title Case

    thank you hilary

     

    eneded up using jscript solution

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