2 Ways to merge survey forms in InfoPath 2010
Learn how you can structure the Main data source of an InfoPath form in such a way that it can serve well for merging and analyzing survey data from multiple forms.
InfoPath 2010 is a terrific tool for compiling answers obtained from a survey.
You could email out an InfoPath form as a survey that contains questions to a list of recipients, create an InfoPath Form Items folder in Outlook to gather the responses, export the InfoPath forms to disk, and then merge the forms into one large InfoPath form for analysis.
The way InfoPath forms are merged depends on the structure of the Main data source of the InfoPath form, so before you can merge all of the answers into one InfoPath form, you must decide on a suitable structure for the InfoPath form template that will form the basis for the merge to take place.
While many controls in InfoPath have a Merge Settings option, the Repeating Section control is probably the most suitable one to create a survey-like InfoPath form.
You can structure an InfoPath form template using InfoPath repeating sections on two ways for use as a survey:
- Create one repeating section that contains all of the questions contained in the survey.
- Create one repeating section for each question contained in the survey.
Note that for both solutions, the option to Allow users to insert and delete the sections must be unchecked on all of the repeating sections, because you are only misusing repeating sections to create an optimal structure for merging data, not for giving users the ability to add sections.
The Main data source for the InfoPath form would resemble the following figure in the first case:
Figure 1. Main data source of InfoPath form for merging survey data.
The Main data source for the InfoPath form would resemble the following figure in the second case:
Figure 2. Main data source of InfoPath form for merging survey data.
When you merge InfoPath forms that have the first type of structure, the answers to all questions for each person are placed below each other after the merge has taken place.
When you merge InfoPath forms that have the second type of structure, the answers from everybody are grouped together by question after the merge has taken place.
A diagram for the results of the merged InfoPath forms for both types of form structure is shown in the following figure:
Figure 3. Two ways to merge InfoPath forms for surveys.
If you are looking to analyze survey data, the second option might be the better one to go with, because it quickly gives you an overview of all of the answers to each question.
Copyright: This article may not be used on web sites (whether personal or otherwise), copied, disseminated, altered, printed, published, broadcasted, or reproduced in any way without an expressed written consent of S.Y.M. Wong-A-Ton. The techniques demonstrated in this article may be used within any Microsoft InfoPath project. This article is provided without any warranties. Copyright for this article is non-transferrable and remains with the author, S.Y.M. Wong-A-Ton.