Monday, September 30, 2013

Enforcing capital letter of every word - InfoPath 2010

Use the translate function to convert the letters to Capital. 
  1. Go to text box properties. 
  2. Click on fx button beside default value box. 
  3. Click on insert function. And select translate function. 
  4. Select the text box field as the first parameter, 
"abcdefghijklmnopqrstuvwxyz" as the second parameter and "ABCDEFGHIJKLMNOPQRSTUVWXYZ" as third parameter.

How to enforce captalisation of first letters of any word in Infopath Forms


  1. In InfoPath 2010, create a new Blank Form template.
  2. On the Home tab under the Controls group, click Text Box to add a text box control to the form template.
  3. Click the text box control to select it.
  4. On the Properties tab under the Properties group, click Default Value. 
  5. On the Field or Group Properties dialog box on the Data tab in the Default Value section, click the Insert Formula button behind the Value text box. 
  6. On the Insert Formula dialog box, type in the following formula into the Formula text box, and click OK.

     concat(translate(substring(., 1, 1), "abcdefghijklmnopqrstuvwxyz", "ABCDEFGHIJKLMNOPQRSTUVWXYZ"), substring(., 2, string-length(.) - 1))



  7. On the Field or Group Properties dialog box, click OK.


  8. Press F5 to preview the InfoPath form.