Monday, July 15, 2013


In this post we will discuss how we can bind a dropdownlist from a SharePoint list in InfoPath 2010. Also check out my previous posts on:

- Read SharePoint 2010 list data using jQuery

- Add custom Submit button in InfoPath form in SharePoint 2010

- Set the Bing Maps key at the web and farm level in SharePoint 2013

Follow below steps:
Step-1:
Open InfoPath (Start -> All Programs -> Microsoft Office -> Microsoft InfoPath Designer 2010), then select Blank Form and Click on Design Form.

Step-2:
Then from Home tab go to the Controls section and add a dropdownlist to the InfoPath form.

Step-3:
From the Ribbon select Data tab and select Data Connections as shown in the figure below:

Step-4:
In the Data Connections wizard click on Add... as shown in the figure below:

Step-5:
In the next step select Create a new connection to Receive data and click on Next as shown in the figure below:

Step-6:
In the next step select SharePoint library or list and click Next as shown in the figure below:

Step-7:
In the next step give the SharePoint site details and Click on Next as shown in the fig below:

Step-8:
Then Select the list from which you want to bind the data as shown in the fig below:

Step-9:
In the next step, select the fields which you want to retrieve and sort order and click on Next as shown in the fig below:

Step-10:
Then click on Next and do not modify anything for Store a copy of the data in the form template.


Step-11:
Then give a name for the data connection and select the checkbox Automatically retrieve data when form is opened as shown in the fig below and click on Finish.

Step-12:
Now Right click on the DropDownList and Select Drop-Down list properties and optionally change the field name and Select Get Choices from an external data sources. And in the Data Source field select the data source name that we have just created. Here you can change the Display name field to what ever field you want.

Step-13:
Now you can publish the form. The data should bind from the SharePoint list as shown in the figure below:


0 Comments:

Post a Comment