InfoPath: Converting data to Upper Case or Lower Case

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 (8)

  1. Anonymous says:

    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.

  2. WKNG says:

    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.…/20998.aspx

    Download the capitalize.xsn to check out the rules.

  3. Hola, buenas tardes.

    Tuve un requerimiento por parte de un usuario en el cual desea que todas las letras, incluyendo acentos, diéresis, etc., se almacenen automáticamente en formato mayúsculas, por lo cual, les comparto la función que nos facilitará esta tarea complementando la
    que nos exponen al inicio del blog, la siguiente función toma en cuenta vocales y letras con acentos del tipo grave, agudo, circunflejo, tilde, anillo, ligadura, diéresis, etc.:

    translate(., "abcdefghijklmnñopqrstuvwxyzáéíóúäëïöüàèìòùâêîôûçãåæøý", "ABCDEFGHIJKLMNÑOPQRSTUVWXYZÁÉÍÓÚÄËÏÖÜÀÈÌÒÙÂÊÎÔÛÇÃÅÆØÝ")

    Gracias y saludos cordiales.

  4. couldsia says:

    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.


  5. Valdo Tovela says:

    Thanks a lot,.

  6. W.G says:

    Does this function work for web form?

  7. VS says:

    How can i capitalize the first letter of each word in infopath?

Skip to main content