SharePoint list CRUD operations using an InfoPath repeating table

This InfoPath video is a demonstration of a repeating table on an InfoPath 2013 form that can be used to add, update, or delete one or more SharePoint list items with one call to SharePoint 2013.

There are several ways you can add, update, or delete items in a SharePoint list. For example, you could use a SharePoint Designer workflow, write code that calls into the SharePoint Object Model, call the SharePoint Lists web service either through code or rules, write code for a SharePoint event receiver, or write code for a custom SharePoint workflow. You can read more about the methods for adding items to a SharePoint list in the following blog post: 5 Ways to submit an InfoPath form to a SharePoint list.

Almost all of the methods to add, update, or delete items in a SharePoint list require you to make a call for each addition, update, or deletion of an item, except for the method that uses the Lists web service of SharePoint, which allows you to perform bulk operations on a SharePoint list.

Because the Lists web service of SharePoint allows you to perform bulk operations, you can combine inserts, updates, and deletes in one call to the web service. You can then use this functionality nicely with a repeating table on an InfoPath form to synchronize row deletions with the deletion of SharePoint list items, row additions with the addition of SharePoint list items, and row updates with the update of SharePoint list items.

The following InfoPath 2013 / SharePoint 2013 demo video shows you how such a solution would work. Note that you will have to write code to create such a solution, since there is no easy codeless way to get such functionality. Part of the code for the solution is explained in recipe 95 of InfoPath 2010 Cookbook 3 (for C#) and InfoPath 2010 Cookbook 4 (for VB), while the logic that you would have to implement for performing bulk operations is briefly mentioned at the end of the Discussion section of the recipe.

See more InfoPath 2013 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