Creating Data Connection in Infopath



Posted on July 15th, 2015

In this post, you will learn how to Creating Data Connection in Infopath to populate the drop down value.

Use Case:

Create a drop down box and populate dropdown values from another list Using InfoPath form data connection.

Pre-Requisites:

  1. InfoPath form designer to be installed.
  2. Source list (from where Dropdown fetches data).
  3. Destination List (The list in which we are creating dropdown column).

Step1:

I am creating a source list with a column called country. 

Step 2

Creating a designation List with two columns (State, Country).

 Customize the destination list in InfoPath form to create a data connection.

Step3:

Go to List Ribbon and select Customize in InfoPath form option. 

Now the list is opened in InfoPath form designer.

Step4:

From the InfoPath form designer ribbon click on Data tab and click on the data connections option.

Once you click on Data Connections, it will open a new window, in that window it shows all existed data connection as well as provides an option to add new.

Step 5:

Click on “Add” button to add new data connection.

Click on Retrieve data option from the wizard. And click next.

Step 6:

Cross check site URL where the source list resides and click next, it will show an available list of SharePoint lists in given site.

Step 7:

Select a desired list from which you want to create a data connection.

After selecting list click on next, it will show all available column from selected list.

Step 8:

Here ID column selected by default (for indexing) Select County column. Here we can sort the column values using sort by option.

Step 9:

Name your data connection (I just named it as County DC). Make sure you check the Automatically retrieve data when the form is opened Checkbox.

Then finish it. We created the data connection successfully.

Now we need to associate the data connection to dropdown list to populate dropdown list options.

Step a:  Select the dropdown column and go to dropdown list box properties option.

Step b: Select get choices from external data sources option 

Step c: From the data source dropdown, select a newly created data connection (i.e. Country DC).

Step d:  Please select the value option by clicking option beside the text box (Value means which value you want to store either Indexed ID or Actual Name internally)

Step e: Similarly select the display name also (Display name usually everyone selects actual column value here it is countries).

Testing:

Apply and click ok. Finally publish the form using publish option in the top ribbon.

Now the Country dropdown populated from Data connection successfully.

Conclusion:

In this post, you have learned how to Creating Data Connection in Infopath to populate the drop down value.

Share your experience with Infopath forms!

Are you working on Infopath form?Share Your Questions and experiences here!

[ ? ]

Upload 1-4 Pictures or Graphics (optional)[ ? ]

 

Click here to upload more images (optional)

Author Information (optional)

To receive credit as the author, enter your information below.

(first or full name)

(e.g., City, State, Country)

Submit Your Contribution

 submission guidelines.


(You can preview and edit on the next page)

About Author

Venkat working as an Office 365 and SharePoint consultant. Venkat likes to share Office 365 and SharePoint knowledge through (Videos, Discussions, Tutorials and Blogs).



Join 6,500 subscribers and receive instant access to

Devendra's Library of Resources for SharePoint Developers


About Author

Devendra Velegandla is a four-time recipient of Microsoft's Most Valuable Professional (MVP) award (2014-2017) for Office Servers and Services MVP and  SharePoint Server. He received the MCC award for his contributions in Microsoft MSDN/TechNet forums. He loves sharing articles, videos, and tutorial on SharePoint and Office 365.