Recurring Data Registers Creation

Hi guys,

I’m trying to add a function to my app allowing the users to create recurring events. Is there any API to create recurring-type of data registers to the data tables?

For example, the user chooses to create an event every Sunday till the end of 2022. Is there an easy way to create all those registers (all columns with the same info except date is one week away) in the data table? Timer doesn’t help here cuz there are many users and each might want to create different recurring events.

Thanks!

I’d create a table called Event. The table would have a column called schedule. The column type would be JSON where I describe how frequently the event occurs. Then in the cloud code, I’d have the logic to calculate all the dates when the event occurs. I do not think there is a reason to create a separate database record for every event.

Thanks Mark! Yeah I only wanted to have one table to store all the events. I’ll try out the JSON column and see if it works for me:)