2 Ways to use a repeating table with a SharePoint list in InfoPath 2010

Learn how you can retrieve data from a SharePoint list to populate a repeating table or repeating section in InfoPath 2010 and how you can submit data from a repeating table to a SharePoint list in InfoPath 2010.

ADVERTISEMENTS

There are 2 ways you can use an InfoPath repeating table with SharePoint lists in InfoPath 2010:

  1. To retrieve and display data
  2. To submit data

Populate a repeating table with SharePoint list values in InfoPath 2010

To retrieve and display data from a SharePoint list in InfoPath, you would have to add an InfoPath 2010 SharePoint list data connection and then bind the Secondary data source that results from this to a repeating table or a repeating section.

An easy way to bind the secondary InfoPath data source for a SharePoint list to a repeating table is to drag-and-drop the repeating group that is located under the dataFields group in the Secondary data source from the Fields task pane onto the form template, and then when you drop it, select Repeating Table from the context menu that appears.

If you want to bind the SharePoint list to a repeating section, select Repeating Section with Controls from the context menu instead of Repeating Table.

Submit repeating table values to a SharePoint list in InfoPath 2010

To submit data to a SharePoint list from an InfoPath form, you could create a SharePoint List form template that allows multiple items to be submitted.

You can use one of 2 ways to create SharePoint list forms in InfoPath 2010. Use the first method if you want to allow multiple items from a SharePoint list to be submitted, and then on the last screen of the Data Connection Wizard, select the Manage multiple list items with this form check box to create repeating fields that you can then bind to either a repeating section or a repeating table.

You can bind the SharePoint list fields to a repeating table or a repeating section the same way you did as when retrieving and displaying data. Just make sure you click Show advanced view at the bottom of the Fields task pane to switch to the data source view so that you can drag-and-drop fields onto the form template.

One thing you should be aware of is that InfoPath 2010 does not allow you to customize all of the available types of lists in SharePoint 2010 through InfoPath forms. For example, a Calendar SharePoint list is not customizable using InfoPath 2010, so you would still have to resort to writing code and/or use one of the 5 ways to submit an InfoPath form to a SharePoint list to be able to submit InfoPath data to SharePoint lists that are not customizable through InfoPath.

 
 Subscribe via RSS or Email

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.

InfoPath 2013 Cookbook: 121 Codeless Recipes for Beginners
InfoPath 2013 Cookbook 2: 121 Codeless Recipes for SharePoint 2013
InfoPath 2010 Cookbook: 101 Codeless Recipes for Beginners
InfoPath 2010 Cookbook 2: 101 Codeless Recipes for SharePoint 2010
InfoPath 2010 Cookbook 3: 101 Code Recipes for C# Developers
InfoPath 2010 Cookbook 5: Integrating InfoPath with Excel and Excel Services


Related Posts

ADVERTISEMENTS

InfoPath 2013 Cookbook: 121 Codeless Recipes for Beginners

InfoPath 2013 Cookbook 2: 121 Codeless Recipes for SharePoint 2013

InfoPath 2010 Cookbook: 101 Codeless Recipes for Beginners

InfoPath 2010 Cookbook 2: 101 Codeless Recipes for SharePoint 2010

InfoPath 2010 Cookbook 3: 101 Code Recipes for C# Developers

InfoPath 2010 Cookbook 4: 101 Code Recipes for VB Developers

InfoPath 2010 Cookbook 5: Integrating InfoPath with Excel and Excel Services