Click here to Skip to main content
15,881,757 members
Articles / Productivity Apps and Services / Sharepoint
Tip/Trick

InfoPath Forms 2013: Part 2

Rate me:
Please Sign up or sign in to vote.
4.89/5 (3 votes)
19 Dec 2013CPOL2 min read 16K   3  
The different methods to fill a dropdown list in an InfoPath form.

Introduction

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

Different methods to fill the dropdown list

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

Image 1

After that we have to select the dropdown list properties:

Image 2

In the list box choices, we have 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:

Image 3

Here we can add values for the dropdown list:

Image 4

After that we show the values in the dropdown list:

Image 5

Get choices from an external data source

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

Image 6

If you have already created a connection, select it from here:

Image 7

Otherwise we need to create a new connection:

Image 8

Here we are selecting the option SharePoint Library or list:

Image 9

Enter the Site URL here:

Image 10

Here we need to select the list or library which you want to fill the dropdown list values with:

Image 11

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

Image 12

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.

Image 13

Then Apply and click the OK button.

Image 14

Here we can show the SharePoint list values which we selected for fill the dropdown list:

Image 15

Here we can see the dropdown list is filled with SharePoint list values:

Image 16

Summary

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

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) EY
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
-- There are no messages in this forum --