Automations to delete rows based on time

Oh for SURE! Great idea - Doc optimization is always key:

In that realm you have a couple of options depending on the kind of data you are dealing with:
1. Archive that data to preserve it while still speeding up your doc

Options and Resources
  1. @Connor_McCormick1 's archive method
    How to handle large docs (Archive Docs)
  2. My archive method
    How to handle large docs (Archive Docs) - #13 by Scott_Collier-Weir

Both methods will allow you to archive your data but preserve it within your doc allowing you to still query that data and run reports on it.

2. Run an automation to delete your rows
While there are a lot of ways to do this, I would run an automation similar to the following:

  • When: time-based automation that runs every day in the middle of the night
  • Then: deleteRows -
targetTable.filter(date<=(today()-days(60))

That should essentially locate any rows where a date is at least 60 days old and erase it _Dates are a little silly though sometimes and I haven’t tested the exact formula, but should work.

Reach out if you need any more help!

1 Like