Deleting SharePoint survey results on daily bases
-
10-12-2019 - |
Question
I have created a survey where users can indicate which sandwich they want to eat for lunch. Now I want the results to be deleted on a daily bases. Is this possible? I can't seem to find any options to set a workflow to delete every option at a certain time. I am using SharePoint server 2013.
Thanks !
Kevin
Solution
If you create a site workflow then this can be scheduled to run at a certain time and can delete the items in your list.
A list based workflow would probably have to pause until a certain time and then delete the items when it wakes up.
Alternatively you could possibly set a policy on the list to delete items older than a certain age?
OTHER TIPS
No, I think that is not possible OOTB.
Possible options:
- You could create a timerjob to delete the old files
- A scheduled console tool that deletes old entry by a daily basis
- A CSOM script in the survey webpart that deletes old entries
- A endless running workflow
- ...
Hi if you use SharePoint 2013 workflows, I would suggest:
- To schedule site level SharePoint workflow using SharePoint Workflow Scheduler
- Then get all questions using Get items by query custom workflow action from Workflow Actions Pack
- Then iterate through them using loop and delete them one by one.
SharePoint Workflow Scheduler and Workflow Actions Pack are paid tools developed by my team.