InfoPath Forms 2013: Part 2

Introduction

In the previous article InfoPath Forms 2013-Part 1 I have demonstrated how to create a simple InfoPath form. In this article we will explore the various methods to fill a dropdown list in an InfoPath form.

Various methods to fill the Dropdown list

Here we must add a new field country in the form and right-click on the control and there is an option like Change control and we can select which control we need. In this case I selected drop down list.

InfoPath-Forms1.jpg

After that we must select the dropdown list properties.

InfoPath-Forms2.jpg

In the List box choices we have the following three options:

  • Enter choices manually
  • Get choices from fields in this form
  • Get choices from an external data source

Here first we are selecting enter choice manually.

InfoPath-Forms3.jpg

Here we can add values for the dropdown list.

InfoPath-Forms4.jpg

After that we show the values in the dropdown list.

InfoPath-Forms5.jpg

Get choices from an external data source

In this option we can fill the dropdown list using an external data source. Here we are filling the dropdown list using a SharePoint list.

InfoPath-Forms6.jpg

If you have already created a connection then select it from here.

InfoPath-Forms7.jpg

Otherwise we need to create a new connection.

InfoPath-Forms8.jpg

Here we select the option SharePoint Library or list.

InfoPath-Forms9.jpg

Enter the Site URL here.

InfoPath-Forms10.jpg

Here we need to select the list or library that you want to fill with the dropdown list values.

InfoPath-Forms11.jpg

Select the field and here we have the options for sort in descending or ascending order and to sort by any field in this list.

InfoPath-Forms12.jpg

Enter the name of the data connection and check the check box for automatically retrieving the data when the form is opened and click the "Finish" button.

InfoPath-Forms13.jpg

Then "Apply" and click the "Ok" button.

InfoPath-Forms14.jpg

Here we can show the SharePoint list values that we selected for filling the dropdown list.

InfoPath-Forms15.jpg

Here we will see the dropdown list filled with SharePoint list values.

InfoPath-Forms16.jpg 

Summary

In this article we have explored the various methods to fill the dropdown list in InfoPath forms.

Up Next
    Ebook Download
    View all
    Learn
    View all