Click here to Skip to main content
Licence CPOL
First Posted 2 Jun 2009
Views 19,822
Bookmarked 3 times

How to add a SharePoint list data connection to an InfoPath dropdown list box

By | 2 Jun 2009 | Article
This article will show you how to populate an InfoPath dropdown box with values from a SharePoint list.

Introduction

If you have a SharePoint list and want an InfoPath dropdown list box populated from the list, follow these steps.

Also, if you have tried to use an XML data connection to populate a dropdown list box when using a browser-based InfoPath form with Forms Services and have received an error when submitting, you may want to use a SharePoint list instead.

Steps

  • Step 1 - Create or use an existing SharePoint list
  • Step 2 - Add a SharePoint list data connection in InfoPath
  • Step 3 - Check the dropdown list box values

Step 1 - In SharePoint, use an existing list or create a custom List

(Note: To ensure that users have access to the list when they fill out a form, the custom list is best located under the same SharePoint site as the form library)

image001.png 

Step 2 - In InfoPath 2007, open the drop-down list box properties, select Look up value from an external data source  and click Add:

image003.png 

Select Create a new connection and select Receive data:

image005.png 

Select SharePoint library or list:

image007.png 

Enter the URL location for the SharePoint library:

 image009.png

Select the name of the SharePoint list:

 image011.png

Select the field(s) you want available in the InfoPath list box:

image013.png

Do not select Store a copy of the data in the form template:

image015.png 

Give the data connection a name (can be the same as the SharePoint list name) and make sure 'Automatically retrieve data when form is opened' is selected:

image017.png

Click on the icon next to Entries to select the field to display in the dropdown list box:

image020.png

Select the custom list and then select the Value and Display Name:

 image022.png

 image024.png

 Step 3 - In InfoPath 2007, preview the form and check the dropdown list box values:

image028.png 

License

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

About the Author

Catherine Wright



United States United States

Member

Sr. Technical Project Manager
MBA,MCSD.NET,PMP,CSM
www.linkedin.com/in/wrightcatherine

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
QuestionMax Number of Lists as Data Source Pinmemberaarenz9:15 15 Dec '09  
GeneralSorting Pinmemberpete.guerette9:52 11 Aug '09  
GeneralRe: Sorting Pinmemberaarenz9:12 15 Dec '09  
GeneralRe: Sorting Pinmemberthekryten11:18 8 Feb '10  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web02 | 2.5.120517.1 | Last Updated 2 Jun 2009
Article Copyright 2009 by Catherine Wright
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid