Back

Multiple Entries

  • 0
  • Databases
  • Web
  • Cloud
Its_MS
28 Aug, 2024, 09:48

I need to be able to add recurring inputs for up to year. I have previously done this without Appwrite like this:

TypeScript
if (isRecurring && recurringInterval === "monthly") {
      for (let i = 1; i <= 11; i++) {
        const nextMonth = new Date(startDate);
        nextMonth.setMonth(nextMonth.getMonth() + i);

        await JointIncome.create({
          joint: id,
          description,
          amount,
          date: nextMonth,
          isRecurring,
          recurringInterval,
          recurringStartDate: startDate,
        });
      }
    }

How would I do this with Appwrite?

TL;DR
Developers want to add recurring entries for up to a year using Appwrite. To achieve this, you can utilize the Appwrite Collections feature to store the recurring inputs. Implement a similar loop structure within your Appwrite script to create entries for each month in the upcoming year.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more