With InfoPath, we can perform calculations automatically when users input information. For instance, in an expense report form, we can automatically calculate the sum of the items as each one is entered. In addition, we can calculate information with non-numeric information. For instance, we can create a quiz that automatically calculates the score when the user submits the form.
In this recipe, we will create a field that automatically calculates the sum of two other fields.
Follow these steps to create a field that automatically calculates the sum of two other fields:
Create a new form template or open an existing one in Microsoft InfoPath Designer 2013.
Add three Text Box controls to the form template as shown in the following screenshot:
In the Data Type field, set the data type for each Text Box control to Whole Number (Integer).
Select the third Text Box control.
Select Control Properties from the Properties...