I'm curious as to how i can create a workflow in SharePoint designer that can delete ( or erase content) in an objects list? Does anyone have an idea?
-
What version of SharePoint are you using? If you aren't sure, you can find out using this guide support.office.com/en-us/article/…– vanblartMay 23, 2018 at 14:23
-
SharePoint online, office 365.– RobertMay 23, 2018 at 14:35
-
what kind of objects?– allegro octopusMay 23, 2018 at 15:59
2 Answers
-
Thanks, i'll try it out... not really sure how to create a variable, but hey, how hard can it be? :D– RobertMay 23, 2018 at 14:36
-
When you add the "Add time to" action, a new variable is created as the default output. You can change this to a different output variable, or leave it set to the default.– vanblartMay 23, 2018 at 14:40
-
-
I have another workflow for the same list, that sends out emails to a certain email adress, should i add this as a parallel block or as a separate workflow?– RobertMay 23, 2018 at 14:57
-
2You would want this to be the last step in your workflow (if your current workflow is 2013, it would be the last Stage). This will only affect new workflows unless you run the workflow again on old items.– vanblartMay 23, 2018 at 15:59
Based on your comments (namely that this should apply to already existing items), I would recommend not using a workflow, but a Retention policy instead. One of the advantages to this, is that cancelling the workflow will prevent the item from being deleted at the correct time.
SharePoint Mavern has a really good guide here (https://sharepointmaven.com/set-retention-deletion-policies-files-folders-sharepoint/). You're probably looking for #3 Document Libraries.
The gist of Retention is that you can set a time period to keep an item, and on the expiration date the item is deleted. Below you can see some of the options available when configuring the policy.
-
Okay, unfortunately our SharePoint is not really only based on SharePoint standard, which means a Consultant have written javascripts and done a few things that i'm not really sure is actually correct, i'm worried that doing this might delete more than i actually want to delete. Is it safer to add some criteria to my original workflow?– RobertMay 28, 2018 at 7:45
-
That's hard to say without reviewing everything individually. If you aren't familiar with what his JS is doing, then I would probably add to the workflow for now and once you review the JS make the decision from there.– vanblartMay 29, 2018 at 12:12
-
1Right, okay. Thanks for your informative answers and hopefully it'll work.– RobertMay 30, 2018 at 14:12