How to copy data from a secondary data source (SharePoint list) to a repeating table in the Main data source of an InfoPath form

Learn how you can use code that either loops through a repeating node or uses an XSL transformation to copy data from a secondary data source to a repeating table in the Main data source of an InfoPath form.

If you are looking for a code solution (C# or Visual Basic) on copying data from a secondary data source (a SharePoint list in this case) to a repeating node (for example that of a repeating table) in the Main data source of an InfoPath form, I’ve just published the following article: Programmatically copy rows from a SharePoint list to a repeating node in the Main data source in InfoPath

Enjoy!

Update Jul 4, 2009:
While you can use code that loops through a repeating table – as discussed in the article referenced above – you can also use an XSL transformation to copy the data from one repeating table to the next in one step.

I show you how to do this in the following article: Copy a SharePoint list to an InfoPath repeating table using XSLT.

If you’re just starting out working with repeating table, I highly recommend that you try to get up to speed with the basics of repeating tables first, before attempting to write code to manipulate their data.

Related Posts

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 of S.Y.M. Wong-A-Ton. Usage of 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, S.Y.M. Wong-A-Ton.

InfoPath 2010 Cookbook

InfoPath 2010 Cookbook 2: 101 Codeless Recipes for SharePoint 2010