Deleting an item from the database each year

Hello everyone!

I need a hand because I don’t know how to fix this… Basically in my database I have a certain date when I put a user inside my app. However, I need to delete an item in the database every “anniversary” of this date.

Let me give you an example. I sign up today (11/14/2023) Mike within my app. In the database, user Mike will have a field called the number of transactions. I need that in a year (11/14/2024) and so on, so every year that comes as long as Mike is enrolled within my app to delete the “transaction number” database field.

How do you advise me to deal with this? I’ve been trying for several days but I can’t find a solution that satisfies me!

Thank you so much for all those who will help me!

Hi there, @mario11… when Mike signs up, schedule a backend workflow to run one year from the sign-up date, and put a step in the backend workflow to clear the transaction number field. Then, have the last step in the backend workflow schedule the same backend workflow to run a year later.

Hope this helps.

Best…
Mike

This is like a recursive workflow right? The problem is that I never fully understand how it works… Could you explain to me better how to deal with the last part? That is, the one to be scheduled for the year even after?

Yes, it’s a recursive workflow. Create a backend workflow that takes a user as a parameter.

Have the first step in the workflow clear the transactions field.

Have the second step in the workflow schedule the same workflow to run one year later.

In the sign-up workflow, add a step that schedules the backend workflow to run one year after the user signs up.

1 Like

Ah that’s how it does! … you go to re-dulate the same workflow! I was missing just that! Really Thank You So Much Mike! I don’t know how to thank you!

1 Like