Form submissions truncating by date


(Tim Davison) #1

Hi all

 

Found a few threads about form submission kinda related but pretty old so thought I'd start a new one.

 

We have a number of forms that have very high volume of submissions.  We require the form submissions to be retained for a period of time (e.g. 3 months) but then after that they can be removed (and should be removed as the total number of submissions is getting really, really high).

 

I can go in and remove them manually (e.g. show 500 submissions at a time, change date range, select all, Delete, etc).  But as there are a number of forms across our instances (and more to come) this is a non-scalable manual process.

 

I'm informed that there is a server-script can run to remove form submissions, which would also allow us to only remove forms after a certain date, but we would most likely want different ranges for different forms (e.g. form A keep 3 months worth, form B 2 weeks worth, form C keep forever).

 

Any way do this?

 

Cheers


(Joel Porgand) #2

Can you just use a trigger with the "set future lineage" action, and link it to the trash with "delete all existing links" set? 


(Tim Davison) #3

Hey that's a nice idea.  I hadn't noticed the 'Delete all existing links' before.  I'll give it a try.

 

Thanks.


#4

Oooo I hadn’t thought of that either.

Yes we used the script as well but ran it as required. Some submissions would be 4000 plus! What forms are you guys running!


However would be purging the trash allot (which is a risk) incase their is content that editors may accidentally delete.


Scotty used in the past said more than 700 items in the trash is a performance hit.


We have a purge trash script set up to run weekly as well.


(Tim Davison) #5

Thanks J.P. It's working like a charm.  Now to get rid of those pesky existing 6000+ submissions (while only leaving the latest ones - headphones and a beverage is in order, I think).

 

Fuzzi, I've heard that as well, that a large trash causes performance hit, but I've had Nathan Callahan say it only affects trash related activities (or maybe he was talking about message inboxes).  I purge trash weekly so it never really builds up very large.  We have a pretty strict archive process so if something was inadvertently placed in the Trash it was a site admin doing the wrong thing, so serves them right.


#6

Thanks Tim - yep the trash also slows the backend of our system - if there’s lots in our trash.


Yep I’m in agreeable with the trash policy but we have had accidents from page curators in the past and I think rebuilding all their staff profiles would of been a bit of a hindrance.


But ace on that form trigger I’m now going to spam our admins ! Thanks you guys rock