Update multiple SharePoint list Items

2019-07-18 19:25发布

问题:

I have an InfoPath form that, when submitted to a SharePoint Form Library, also adds a single item to a Task List. Each item in the Task List contains a People field that may contain multiple names. I have code in the form that creates separate items in a Custom List, one for each name in the People field.

When I manually update the Status field in a Task List item, I would like a SharePoint workflow (I'm using Designer 2010) to update all of the Status fields for the corresponding items in the Custom List. The "Update list item" option in ShP 2010 workflows will only update a single list entry. Is there a way to update all of the Custom List items that correspond to the Task List item whose Status is being modified?

回答1:

To update multiple list items simultaneously, use SharePoint batch update. Look at following links for more information:

  • MSDN - Visual How To - Batch Updating List Items in Windows SharePoint Services 3.0
  • http://apmblog.compuware.com/2009/01/20/sharepoint-using-batch-updates-to-speed-up-performance/

You can also use batch operations for inserting and deleting.



回答2:

I have written two workflows on codeplex - one is https://rwomi.codeplex.com and one is https://umlisdw.codeplex.com/