Book Image

SharePoint 2013 WCM Advanced Cookbook

By : JOHN CHAPMAN
Book Image

SharePoint 2013 WCM Advanced Cookbook

By: JOHN CHAPMAN

Overview of this book

Table of Contents (19 chapters)
SharePoint 2013 WCM Advanced Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Calculating field values in InfoPath based on the values of other fields


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.

How to do it...

Follow these steps to create a field that automatically calculates the sum of two other fields:

  1. Create a new form template or open an existing one in Microsoft InfoPath Designer 2013.

  2. Add three Text Box controls to the form template as shown in the following screenshot:

  3. In the Data Type field, set the data type for each Text Box control to Whole Number (Integer).

  4. Select the third Text Box control.

  5. Select Control Properties from the Properties...