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:
- 5 Ways to submit an InfoPath form to a SharePoint list
- Bulk delete SharePoint list items via an InfoPath 2010 form
- 2 Ways to use a repeating table with a SharePoint list in InfoPath 2010
- 5 SharePoint List demo solutions you might have missed
- Loop through InfoPath repeating table to create SharePoint list items via a workflow
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.