Automatically Set the First Letter to Upper Case in InfoPath SharePoint 2013

In one of work assignments, where We had implemented Info Path Forms to Collect User Data. There is a new Requirement to automatically converts first letter of each Field to Upper Case. 
 
For example, If use Enters the Name for City Field as chennai, the output should be Chennai. 
 
In this blog, I will provide you the steps followed to achieve this Upper Case Conversation in InfoPath Form SharePoint 2013.
 
Steps 
  1. Create a field named as City. 
  2. Create a new action rule and configure it as follows:
Condition: None
Rule Type: Action
Under Actions Tab,
Set a field’s value: ‘City’
Value: Click on FX and use the below formula.
concat(translate(substring(City, 1, 1), "abcdefghijklmnopqrstuvwxyz", "ABCDEFGHIJKLMNOPQRSTUVWXYZ"),substring(City,2,string-length(City-1)))
 
 
Happy SharePointing :-)