Help

Fixed availability, but dynamic booking possible?

Topic Labels: Base design
1268 1
cancel
Showing results for 
Search instead for 
Did you mean: 
DennisyuTSS1
5 - Automation Enthusiast
5 - Automation Enthusiast

Hey everyone,

I am building a sort of meeting room booking system.

So the meeting room will have a fixed availability between 9am to 6pm
However, the bookings can have 5 variants:

  • 15min
  • 30min
  • 45min
  • 60min
  • 90min

How can I allow people to book meetings based on the time they want, but block out the availability despite the duration differences? I'm happy to compromise and limit it to 2 options if necessary.

1 Reply 1
Jack_Manuel
7 - App Architect
7 - App Architect

You would need to make the end time dynamic. I believe the easiest way would be with a formula that adds the duration to the start time.

If I were you I'd remove the 'min' from your duration option names to make the end time formula cleaner. If you did this your end time formula would simply be,

 

DATEADD({Start Field}, {Duration Field}, 'minute')

 

If you need to keep the "min" in the option names, you could use a Switch() in your formula e.g.

 

SWITCH(
  {Duration Field},
  "15min", DATEADD({Start Field}, 15, 'minute'),
  "30min", DATEADD({Start Field}, 20, 'minute'),
  "45min", DATEADD({Start Field}, 45, 'minute'),
  "60min", DATEADD({Start Field}, 60, 'minute'),
  "90min", DATEADD({Start Field}, 90, 'minute')
)

 

This is not the most efficient way to write this but I find it to be the most readable and the easiest to update with new durations in the future if you need to.