Skip to main content
Nintex Community Menu Bar

Delete all items in a list...

  • August 12, 2008
  • 4 replies
  • 18 views

Forum|alt.badge.img+1

I am creating a process that needs to delete all the items in a Sharepoint list before it copies an item from another list.  I see the tool that deletes Sharepoint list items, but it requires a listID.  So can K2 delete all the items or just one at a time??


 

4 replies

Forum|alt.badge.img+11
  • August 13, 2008

Dave,


Normally this would be very easy.  Most wizards can take a repeating XML node or SmartObject list as a parameter and perform the requested operation once for each item.  Unfortunately, this wizard does not support that, but an enhancement request has been logged.


The good news is you can still do this easily using a little-know feature of blackpearl that allows an activity to behave like a foreeach loop.  I'll see if I can write something up or create a screen recording and post it.


David


Forum|alt.badge.img+11
  • August 13, 2008

Here is a recording that demonstrates one method using activity slots to iterate through a list to accomplish this task.  This example uses a SmartObject, but you could use a similar concept with the SharePoint Search Wizard and the SharePoint List Item (delete) Wizard.


I plan on posting a write-up on underground soon.


http://www.k2underground.com/files/folders/25499/download.aspx


David


Forum|alt.badge.img+1
  • Author
  • August 14, 2008

Thanks for the demo on how to do this.  It will be very helpful.  I appreciate you taking the time.


Dave


Forum|alt.badge.img+3
  • April 8, 2011

This solution is a couple years old, is there an easier way?


I implemented this to delete some list items, and it works great when I have 10-20... but when I have over 100 SharePoint sometimes chokes and I get an error.


My thought was somehow processing 50 or so at a time, but I have yet to work out how to accomplish this.