# Scheduling logic

**URL:** https://community.glideapps.com/t/scheduling-logic/25500
**Category:** Ask for Help
**Created:** [April 13, 2021, 1:39pm UTC](https://community.glideapps.com/t/scheduling-logic/25500 "2021-04-13T13:39:01Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Rafael\_Barbosa](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rafael_barbosa/32/24798_2.png) [@Rafael\_Barbosa](https://community.glideapps.com/u/Rafael_Barbosa)
#### Post date: [April 13, 2021, 1:39pm UTC](https://community.glideapps.com/t/scheduling-logic/25500/1 "2021-04-13T13:39:01Z")

</div>

Hi,

I would like to work on a scheduling application for a volleyball arena but I am having some difficulties

The customer can set a time slot for a specific day and that time slot on that day cannot be available anymore

> THE RULE IS

The customer selects a day of the month, then selects a time slot that is available and then fills in the rest of the information to be sent to the schedules sheet

- I need to show only the available time bands for the selected day
- The same time slot cannot be scheduled on the same day
- Some days of the week cannot be selected, such as sundays
- Some times cannot be selected, such as in the evening

Can someone help me? Or have something to sell?

---

<div class="post-metadata">

### Author: ![eltintero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/eltintero/32/76520_2.png) [@eltintero](https://community.glideapps.com/u/eltintero)
#### Post date: [April 14, 2021, 12:48am UTC](https://community.glideapps.com/t/scheduling-logic/25500/2 "2021-04-14T00:48:42Z")

</div>

Hey Rafa,  
We just built an app like this for a client. I’ll send your a video tomorrow morning.  
In this case, each hairdresser has their own working hours, and users can’t book on conflicting time slots or off hours.

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [April 14, 2021, 2:08am UTC](https://community.glideapps.com/t/scheduling-logic/25500/3 "2021-04-14T02:08:12Z")

</div>

I think @Mishta_P recently did something similar to this.

---

<div class="post-metadata">

### Author: ![Lisa](https://avatars.discourse-cdn.com/v4/letter/l/f08c70/32.png) [@Lisa](https://community.glideapps.com/u/Lisa)
#### Post date: [April 14, 2021, 2:56am UTC](https://community.glideapps.com/t/scheduling-logic/25500/4 "2021-04-14T02:56:51Z")

</div>

Hi Rafael,

I think this thread will help you, it covers how I, and other Gliders, have approached this use case.

> [@How would you approach this dilemma for a booking app](https://community.glideapps.com/t/how-would-you-approach-this-dilemma-for-a-booking-app/19528):
>
> So I know so many have created some great booking templates @Robert_Petitto and @Lucas_Pires to name a few. With actions now in place, I’ve been toying with an app in beta just to see what will work. I’m trying to create a booking app for creatives, with all the complexities that come with it (marking days as unavailable, blocking off times). What I currently have seems to work - but I feel like it only works for certain time frames (specifically up to 120 minutes for an appointment. I don’t t…

---

<div class="post-metadata">

### Author: ![Wiz.Wazeer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/wiz.wazeer/32/72423_2.png) [@Wiz.Wazeer](https://community.glideapps.com/u/Wiz.Wazeer)
#### Post date: [April 14, 2021, 4:26am UTC](https://community.glideapps.com/t/scheduling-logic/25500/5 "2021-04-14T04:26:38Z")

</div>

Interesting. I just finished building a hotel reservation app. Learned a few things like how to perform an “and/or” action on an inline list with an list and how to manage booking conflict. Imagine a scenario where 5 ppl are trying to grab the same room all the same time. I would recommend @Jeff_Hager dynamic calendar template for this sort of thing.

---

<div class="post-metadata">

### Author: ![Mishta\_P](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mishta_p/32/16900_2.png) [@Mishta\_P](https://community.glideapps.com/u/Mishta_P)
#### Post date: [April 14, 2021, 6:20am UTC](https://community.glideapps.com/t/scheduling-logic/25500/6 "2021-04-14T06:20:08Z")

</div>

Are the time slots all the same length? If so, then it isn’t too bad. If they vary it can get a little messy.

I wanted a version that used the calendar view, because it looks more familiar. And I also wanted one which showed what was available/unavailable before you clicked on it.

The settings allow you to select which days it is open, what hours within those days. You can either have morning/afternoon/evening sessions, or multi room/courts per day. I think I set it up for 3 seasons per day, but there is no reason why it couldn’t do more.

If the time slot length does vary quite a lot I think the logic breaks down. I have a feeling it was when the max time slot length was over 3 or 4 times the minimum length.

> **[Calendar Test v2](https://earthy-vacation-7247.glideapp.io/)**

I’m afraid my main job took over again, so I haven’t developed this any further. I think I made it copyable.

---

<div class="post-metadata">

### Author: ![eltintero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/eltintero/32/76520_2.png) [@eltintero](https://community.glideapps.com/u/eltintero)
#### Post date: [April 14, 2021, 4:19pm UTC](https://community.glideapps.com/t/scheduling-logic/25500/7 "2021-04-14T16:19:00Z")

</div>

Hey Rafa,  
Here’s the video I promised:

> **[Screen Recording 2021-04-14 at 11.17.04 AM](https://media.lowcode.agency/5zuBA1dL)**

---

<div class="post-metadata">

### Author: ![Wiz.Wazeer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/wiz.wazeer/32/72423_2.png) [@Wiz.Wazeer](https://community.glideapps.com/u/Wiz.Wazeer)
#### Post date: [April 14, 2021, 5:56pm UTC](https://community.glideapps.com/t/scheduling-logic/25500/8 "2021-04-14T17:56:37Z")

</div>

This is cool
