SharePoint list lookup in an InfoPath repeating table

Watch a demonstration of how you can use data that is stored in a SharePoint list to look up and display data in a repeating table whenever data is entered into the repeating table control on an InfoPath 2010 form.

The InfoPath 2010 with SharePoint 2010 video below is a demonstration of how you can use a SharePoint list to look up and provide data to a repeating table on an InfoPath form. The steps to create such a solution are shown in the bonus video tutorial for InfoPath 2010 Cookbook 2 named SharePoint list lookup for InfoPath repeating table that can be found in the InfoPath 2010 Cookbook 2 Club.

InfoPath 2010 with SharePoint 2010 video transcript

Here I'm in SharePoint 2010 where I've got this Fruits SharePoint list that contains the names and colors of fruits. The intention is that I would like to use this SharePoint list as a lookup list for data in a repeating table.

For example, if I were to enter Banana in the repeating table, I would like to look up its color in this SharePoint list, and in this case return Yellow back to the InfoPath form and display Yellow in the repeating table.

If a fruit does not exist in the SharePoint list or it does not have a color assigned to it, for example Papaya does not have a color here, then nothing should appear in the repeating table, but the user should still be able to enter their own data.

I've already published an InfoPath form template to this SharePoint form library, so if I click Add document to add a new form, and enter a fruit name, you should see for Banana, Yellow should appear. And if I enter Kiwi, Green should appear.

If I were to enter Papaya, nothing should happen, so then I can manually enter a color here. And if I were to enter something that doesn't exist in the list, for example Grapefruit, again nothing would happen. And if I enter Apple, Apple exists, Red appears in the color field.

See more InfoPath 2010 tutorial videos »


Related InfoPath Articles:


Copyright: This article may not be used on web sites (whether personal or otherwise), copied, disseminated, altered, printed, published, broadcasted, or reproduced in any way without an expressed written consent. The techniques demonstrated in this article may be used within any Microsoft InfoPath project. This article is provided without any warranties. Copyright for this article is non-transferrable and remains with the author.

InfoPath 2013 Cookbook: 121 Codeless Recipes for Beginners

InfoPath 2013 Cookbook 2: 121 Codeless Recipes for SharePoint 2013

InfoPath 2010 Cookbook: 101 Codeless Recipes for Beginners

InfoPath 2010 Cookbook 2: 101 Codeless Recipes for SharePoint 2010

InfoPath 2010 Cookbook 3: 101 Code Recipes for C# Developers

InfoPath 2010 Cookbook 4: 101 Code Recipes for VB Developers

InfoPath 2010 Cookbook 5: Integrating InfoPath with Excel and Excel Services