InfoPath 2010 SharePoint list data connection
Learn how to add an InfoPath 2010 SharePoint list data connection to a SharePoint list or library.
You want to create an InfoPath 2010 SharePoint list data connection to be able to display data in a control (for example a drop-down list box or a repeating table) on an InfoPath 2010 form.
Create a Receive InfoPath 2010 data connection to a SharePoint list.
The first step to display data from an external data source such as a SharePoint list within an InfoPath form is to add an InfoPath data connection to that external data source to the InfoPath form template. And for this, you must add a Receive data connection to the InfoPath form template.
Once you add a Receive data connection to an InfoPath form template, it becomes a secondary data source of the form template.
The steps for creating an InfoPath 2010 data connection have not changed much from the steps to add a data connection to a SharePoint list or library in InfoPath 2007, as you will see shortly if you are familiar with how it is done in InfoPath 2007.
Before you begin, ensure that you have created a list in SharePoint 2010 or that you have a SharePoint list available that you can use while performing the steps below.
To create an InfoPath 2010 SharePoint list data connection:
- In InfoPath Designer 2010, create a new Blank Form template.
- On the Data tab under the Get External Data group, click From SharePoint List.
Figure 1. From SharePoint List button on the ribbon in InfoPath 2010.
- On the Data Connection Wizard, type in the URL of the SharePoint site where the SharePoint list you want to connect to is located, and click Next.
- On the Data Connection Wizard, select the SharePoint list or library you want to connect to, and click Next.
- On the Data Connection Wizard, select all of the fields from the SharePoint list from which you want to display data on your InfoPath form, and click Next.
Figure 2. Selecting SharePoint list fields from a data connection in InfoPath 2010.
- On the Data Connection Wizard, select Store a copy of the data in the form template if you want the InfoPath form to be able to still display cached data when no connection to SharePoint is available, and click Next.
- On the Data Connection Wizard, change the name for the data connection if you wish, and click Finish.
With this you have added an InfoPath 2010 SharePoint list data connection to your InfoPath form template. This InfoPath data connection will be listed on the Data Connections dialog box. To view it, on the Data tab under the Get External Data group, click Data Connections to open the Data Connections dialog box and view the data connection you have just created.
You could have also created the InfoPath 2010 SharePoint list data connection by clicking Add on the Data Connections dialog box and then following the instructions on the Data Connection Wizard to create a Receive data connection to a SharePoint library or list. Using the From SharePoint List button on the ribbon will save you 4 clicks.
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.
Related InfoPath Articles:
- Main vs. secondary data sources
- Create a data connection to an XML file in InfoPath 2010
- How to add a data connection to a SharePoint list or library in InfoPath
- Connect InfoPath 2010 to a SQL Server 2008 table
- Submit InfoPath forms to a SharePoint document library