Help with a Calendar App

Hello, I am working on a Calendar website to help people book volunteering opportunities.

I was wondering if someone can help me solve the below problem:

When charities add a new event to their calendar. We would like to give them the option of ‘repeat on this day for the next 4 weeks’

The toggle is set up but the back-end hasn’t been worked out yet.

Find out whether this is possible.

You will need the toggle to auto-fill dates and create 4 new rows in the Event_id table.

Example:

Charity creates an event on Friday 14 July. The event is happening every Friday for the next 4 weeks. So they select “repeat event for 4 weeks” and submit.

When they submit we know for sure 1 new row will be created - for the 14 July. But we’ll need 3 more rows auto-populating the dates for 21/07/2023, 28/07/2023… and so on.

I think I would do this with a custom form.

  • Use an entry to fill the “first week” column.

  • Create 3 math columns called “2nd week”, “3rd week”, “4th week”.

2nd week formula: “First week” + 7
3rd week formula: “First week” + 14
4th week formula: “First week” + 21

  • Add a switch pointing to a boolean column to store the “Repeat event for 4 weeks” value.

Then on the Submit button, have 2 branches.

If “Repeat event for 4 weeks” is checked > Use 4 add row actions to iteratively add 4 rows with the corresponding “First week”, “Second week” and so on.

If the column above is not checked > Just add 1 row with the “First week” value.

1 Like

Hi, how do you deal with a timeslot already booked ? (if any)