SharePoint lists and InfoPath

Learn how to use InfoPath to connect to, retrieve data from, look up data in, and submit data to SharePoint lists.

SharePoint lists form the backbone of Windows SharePoint Services (WSS) 3.0 and Microsoft Office SharePoint Server (MOSS) 2007, so they also play an important role when you are trying to create InfoPath solutions that integrate with SharePoint. The articles listed below can help you get started.

Create a SharePoint list from within InfoPath

Programmatically create a custom SharePoint list from a repeating table in an InfoPath web-based form

Learn how you can use data from a repeating table in an InfoPath web-based form that you open on a SharePoint site to create a custom SharePoint list.

Create and use a data connection to a SharePoint list

How to add a data connection to a SharePoint list or library in InfoPath

This step-by-step InfoPath tutorial explains how to add a data connection to a SharePoint list or library and then view the structure of the secondary data source in the Data Source task pane.

Programmatically copy rows from a SharePoint list to a repeating node in the Main data source in InfoPath

Learn how to use C# or Visual Basic code to copy the rows from a SharePoint list to a repeating node in the Main data source of an InfoPath form.

Copy a SharePoint list to an InfoPath repeating table using XSLT

Use XSLT and the XslCompiledTransform class in C# to transform the data stored within a SharePoint list (secondary data source) and copy the transformed data to a repeating table in the Main data source of an InfoPath form.

Filter and sort a SharePoint list in InfoPath using a DataView

Learn how you can use C# code and the DataView class that comes with ADO.NET to sort and filter items from a secondary data source to a SharePoint list in InfoPath.

Pre-filtering large SharePoint lists in InfoPath using WSS’s owssvr.dll

Learn how you can take advantage of Windows SharePoint Services’ owssvr.dll to filter a long or large list of data in a SharePoint list before the data is returned to an InfoPath form and used to populate InfoPath controls.

Using a SharePoint list populated multi-select list box and conditional formatting to show/hide sections

In this InfoPath video tutorial you’ll learn how to use conditional formatting on a repeating section to show/hide sections based on the items that were selected in a multi-select list box that is populated via a SharePoint list.

Look up data in a SharePoint list

How to simulate Excel’s VLOOKUP function in InfoPath to look up data in a secondary data source using rules and filters

Learn how to use rules and filters to look up data in a secondary data source (here: a SharePoint list) when an item is selected from a drop-down list box and create functionality similar to Excel’s VLOOKUP function, but then in InfoPath.

Programmatically check whether a value exists in a drop-down list box bound to a SharePoint list using an XPath filter

Learn how to use an XPath filter expression on a SharePoint list to look up a value in a secondary data source to which a drop-down list box in InfoPath is bound.

Use InfoPath controls with a SharePoint list

Auto-fill a repeating table with data from a SharePoint list when a row is inserted

Auto-fill a repeating table with data from a SharePoint list when a row is inserted

Filter a SharePoint list in a repeating table in InfoPath on a date range

Use conditional formatting on a repeating table in InfoPath to filter a SharePoint list on a date range using two date picker controls.

How to submit the rows of a repeating table in InfoPath to a SharePoint list

Programmatically add items from a repeating table in InfoPath to a SharePoint list by submitting a CAML update batch to the UpdateListItems method of the Lists web service that comes with Windows SharePoint Services (WSS).

Programmatically add an item with a Rich Text field to a SharePoint list using InfoPath 2007

Programmatically add an item to a SharePoint list by submitting a CAML update batch to the UpdateListItems method of the Lists web service that comes with Windows SharePoint Services (WSS).

Use the SharePoint Object Model to access a SharePoint list

How to submit a file attached to an InfoPath form as an attachment to a SharePoint list item

Learn how you can programmatically save a file attachment from an InfoPath form as an attachment to a SharePoint list item when the InfoPath form is submitted to the SharePoint list.

How to submit an InfoPath form to a SharePoint list and attach the form to the list item

Learn how to use the Attachments collection of a SharePoint list item to save the XML of an entire InfoPath form as an attachment to a SharePoint list item.

How to use a SharePoint ItemAdded event handler and the object model to submit data from an InfoPath form to a SharePoint list

This article explains how you can use an ItemAdded event handler on a Form Library to extract data from an InfoPath form that was submitted to the form library and use this data to add a new item to a custom SharePoint list.

How to use the SharePoint object model to submit data from an InfoPath browser form to a SharePoint list

This article explains how you can use the SPContext, SPSite, SPWeb, SPList, and SPListItem classes in C# or Visual Basic code in an InfoPath form to submit the form’s data as a new item to a custom SharePoint list.

Use SharePoint lists in workflows

Automatically add a new item to a SharePoint list using InfoPath 2007 and a custom workflow

Use SharePoint Designer 2007 to create a custom workflow that will add a new item to a SharePoint list whenever a new InfoPath form is added to a form library.

How to use a Visual Studio workflow to submit data from an InfoPath form to a SharePoint list

This article explains how you can use a custom Visual Studio sequential workflow on a Form Library to extract data from an InfoPath form that was submitted to the form library and use this data to add a new item to a custom SharePoint list.

Work with special types of SharePoint lists

Programmatically add an item/event to a SharePoint 2007 calendar using InfoPath 2007 and .NET code

Use the UpdateListItems method of the Lists web service that comes with Windows SharePoint Services (WSS) to add an item to a SharePoint calendar from within an InfoPath 2007 form.

Working with InfoPath