SharePoint Immersion Experience

A journey of a TSP for Collaboration

InfoPath: Converting data to Upper Case or Lower Case

InfoPath: Converting data to Upper Case or Lower Case

  • Comments 4
  • Likes

Here's the formulas to convert the data of the current textbox to UPPER case or lower case.

Convert To UPPER case
translate(., "abcdefghijklmnopqrstuvwyxz", "ABCDEFGHIJKLMNOPQRSTUVWYXZ")

Convert to lower case
translate(., "ABCDEFGHIJKLMNOPQRSTUVWYXZ", "abcdefghijklmnopqrstuvwyxz")

Convert first letter to UPPER case:
concat(substring(translate(., "abcdefghijklmnopqrstuvwxyz", "ABCDEFGHIJKLMNOPQRSTUVWXYZ"), 1, 1), substring(., 2, string-length(.) - 1))

 

Comments
  • Useful info.

  • How do I convert first name's first letter to upper  and last name first letter's initial to upper case when they are being captured in the same field and with a space in between.

    thanks.

  • As for converting first name and last name to upper case for the first letter, I've not done it myself using formulas.

    There's someone who have done it using rules. It's pretty cool and works.

    www.infopathdev.com/.../20998.aspx

    Download the capitalize.xsn to check out the rules.

  • Awesome, I used this to translate default value by enclosing the text with quotation marks. Yes, I know why not just enter data in all caps? The source is AD display.

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment