converting first letter of first and last name to capital letters in infopath 2010 - InfoPath Dev
in

InfoPath Dev

converting first letter of first and last name to capital letters in infopath 2010

Last post 05-06-2013 06:26 AM by couldsia. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 05-03-2013 08:43 AM

    converting first letter of first and last name to capital letters in infopath 2010

    how do we achieve this "converting first letter of first and last name to capital letters in infopath 2010" in a same field. eg. Mary Jones Thanks :)
  • 05-03-2013 12:04 PM In reply to

    Re: converting first letter of first and last name to capital letters in infopath 2010

     Well - I'm sure you know that this is a lot trickier to get right than just first letter of first and last name - since a last name like O'Brian or McAfee starts getting pretty tricky. But you could use translate and substring functions to try this - like:

    concat(translate(substring(my:FirstName, 1, 1), "abcdefghijklmnopqrstuvwxyz", "ABCDEFGHIJKLMNOPQRSTUVWXYZ"), substring(my:FirstName, 2), " ", translate(substring(my:LastName, 1, 1), "abcdefghijklmnopqrstuvwxyz", "ABCDEFGHIJKLMNOPQRSTUVWXYZ"), substring(my:LastName, 2))

    The above assumes that the first name and last name are in different fields. This would be different if they were in the same field - you'd probably need to use substring-before and substring-after to get the text before and after the first space and cross your fingers no one is named Mary Ann.

    Hilary Stoupa

  • 05-06-2013 06:26 AM In reply to

    Re: converting first letter of first and last name to capital letters in infopath 2010

    I realized it was tricky, I guess you might have to set several rules for this and change the formula according to the input in the field. I was capturing first name and last name into same field and then if it was not in the format I wanted, I wanted to convert it into that format.
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.