How to delete rows after 30 days?

So we have a table of tracking numbers for customer orders we update every 30 days.

  • Whenever there’s a new tracking, it gets added automatically to this table
  • Our customer service person then grabs this tracking and sends it to the customer on Etsy & she checks the box that says [Updated on Etsy?]

I want to set a rule to automatically delete rows that have been there for more than 30 days after that [Updated on Etsy?] box is ticked.

Here’s what I’ve done so far.

My question is: are my formulas in the last screenshot correct? I’m not very technical so I’m always very nervous with these things, especially when the last box says “Apply to: All rows” :joy:

Hi @Duy_Nguyen
[EDIT : The column “Day Since Creation” is in fact “Day Since Date Update” :wink: )
I tried to recreate from scratch your subject

First automation > to update “Date Update” Each time the checkbox is ticked

For the second automation, I create a new column with this formula, to count the time between today and the date update

So, each morning, you launch an automation that will run through every row of your table. And if the day since creation = 30, it will delete it !

If i simulate it, it works perfectly

CPT2212060956-1451x678

So with that, each morning, your table will be cleaned

PS : Personal suggestion, rather than deleting your row, I suggest you to add a status like “active/inactive”, and that your automation put the status to inactive, and you filter your view to show only active. So that you will always have access to your data rather than deleting it !

Cheers

Quentin

2 Likes

hi @Quentin_Morel , to start with your last advice. That seems the way to go for me: do not delete but hide.

anyway, @Duy_Nguyen asked us to help with a delete. it can be done in various ways like the one described very well by @Quentin_Morel . What I like about the question is the honesty related to ‘all rows’. What the software does is indeed running over all rows, but it is up to us to tell the software what to do with each row. We are in control :wink:

Below my take on it.

  1. table with checkbox and column that contains the last change
  2. checkbox that only gets active when there is a delta of 30 days and the update is checked
  3. automation that runs

here it goes

next we add a rule that is only active when the date is 30 days in the past and the checkbox is checked. Two conditions have to be met. Since the function does not allow for manuel manipulation, I added a test column to show you how it works.

the last step is to have the automation run over all rows, but to only delete the rows with the checked values and for the latter we apply a filter:

This is not a better way, simply an other method.
Enjoy the variations and flavors we bring to the table.
Cheers, Christiaan

ps I documented my contribution:

2 Likes

Wow, you guys are amazing :pray:t3:

@Quentin_Morel since my approach is already somewhat similar to yours, I ultimately went with your method, but like @Christiaan_Huizer said, both can get me to the finish line :checkered_flag:

I love @Christiaan_Huizer 's way of adding the formula right into the Date Updated column so it would actually calculate all the previous rows as well, so I used that instead of creating an automation.

To answer your question about why I want to delete the rows: It’s because after 7-14 days most, if not all orders would have been received by the customers, so we would have no need for it.

  • If we still need to look it up, we can look up the order tracking via email (since that’s the original source & where we pull the data from).
  • To also lighten the load on Coda (with GSheets, I know once you get to a certain number of rows, it starts to get slow). Just trying to be proactive :grin:

Thank you guys so much! And Coda ROCKS! :partying_face:

Hi @Duy_Nguyen
Happy that those collaborative proposal with @Christiaan_Huizer allowed you to reach this perfect combination that fit your needs :wink:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.