# Stop bookings if event number full

**URL:** <https://community.glideapps.com/t/stop-bookings-if-event-number-full/37252>\
**Category:** Ask for Help\
**Created:** [January 16, 2022, 2:01am UTC](https://community.glideapps.com/t/stop-bookings-if-event-number-full/37252 "2022-01-16T02:01:58Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Kakouros](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/john_kakouros/32/2813_2.png) [@John\_Kakouros](https://community.glideapps.com/u/John_Kakouros)\
**Post date:** [January 16, 2022, 2:01am UTC](https://community.glideapps.com/t/stop-bookings-if-event-number-full/37252/1 "2022-01-16T02:01:58Z")

</div>

I have a simple events app with limited spots available. Once the event is full I do not want to take any more bookings

Event: EventID, Name, Location Max Bookings

Event Bookings: EventID, email, Number attending

IFnumber attending + Rollup of Number attending for the same event \> Max Bookings THEN Display Message “Event overbooked”

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [January 16, 2022, 2:05am UTC](https://community.glideapps.com/t/stop-bookings-if-event-number-full/37252/2 "2022-01-16T02:05:55Z")

</div>

use roll up column to sum attending number, then use visibility condition to hide submit button and display info text, that event is fully booked

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [January 16, 2022, 2:48am UTC](https://community.glideapps.com/t/stop-bookings-if-event-number-full/37252/3 "2022-01-16T02:48:04Z")

</div>

This 👆

---

<div class="post-metadata">

**Author:** ![John\_Kakouros](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/john_kakouros/32/2813_2.png) [@John\_Kakouros](https://community.glideapps.com/u/John_Kakouros)\
**Post date:** [January 16, 2022, 2:48am UTC](https://community.glideapps.com/t/stop-bookings-if-event-number-full/37252/4 "2022-01-16T02:48:54Z")

</div>

That’s what I am trying to do but I cannot get the Max Bookings from the Event table when making a booking

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [January 16, 2022, 2:49am UTC](https://community.glideapps.com/t/stop-bookings-if-event-number-full/37252/5 "2022-01-16T02:49:46Z")

</div>

do you have an attending column?

---

<div class="post-metadata">

**Author:** ![John\_Kakouros](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/john_kakouros/32/2813_2.png) [@John\_Kakouros](https://community.glideapps.com/u/John_Kakouros)\
**Post date:** [January 16, 2022, 2:52am UTC](https://community.glideapps.com/t/stop-bookings-if-event-number-full/37252/6 "2022-01-16T02:52:50Z")

</div>

In which table? Events or Event Bookings

---

<div class="post-metadata">

**Author:** ![John\_Kakouros](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/john_kakouros/32/2813_2.png) [@John\_Kakouros](https://community.glideapps.com/u/John_Kakouros)\
**Post date:** [January 16, 2022, 2:53am UTC](https://community.glideapps.com/t/stop-bookings-if-event-number-full/37252/7 "2022-01-16T02:53:49Z")

</div>

In Events I have a Max Bookings and Bookings to date

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [January 16, 2022, 2:54am UTC](https://community.glideapps.com/t/stop-bookings-if-event-number-full/37252/8 "2022-01-16T02:54:15Z")

</div>

i don’t know your data set…

 ![Screen Shot 2022-01-15 at 9.53.30 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/d/cdccb6568f21b066d9c5a112c4ff78abc0fc2fe1.png)

once you have total attendance, you can create the if-else column with condition =\< MAX booking

 ![Screen Shot 2022-01-15 at 10.03.33 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/a/1a13efb23f3fac68e04f956639887d0b0227730b.png)

---

<div class="post-metadata">

**Author:** ![John\_Kakouros](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/john_kakouros/32/2813_2.png) [@John\_Kakouros](https://community.glideapps.com/u/John_Kakouros)\
**Post date:** [January 16, 2022, 3:07am UTC](https://community.glideapps.com/t/stop-bookings-if-event-number-full/37252/9 "2022-01-16T03:07:06Z")

</div>

My data set is as follows:  
Event table with multiple events (EventID, Event Name, Location Max Bookings)

Event Bookings table with multiple events and name of each person (EventID, email, Number attending)  
Whenever a person makes a booking check the Max bookings for the selected event  
IF number attending + Rollup of Number attending for the same event \> Max Bookings THEN Display Message “Event overbooked”

Your example does a rollup on all events not the selected event. How do I get the Max bookings for the selected event

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [January 16, 2022, 3:09am UTC](https://community.glideapps.com/t/stop-bookings-if-event-number-full/37252/10 "2022-01-16T03:09:28Z")

</div>

add a new if-else column, that shows only selected events, and sum it

 ![Screen Shot 2022-01-15 at 10.13.09 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/6/4615dfc6d0cb97eae162dd877d51629f9efc0ea8.png)

in your case replace the select event with the ID of the event

---

<div class="post-metadata">

**Author:** ![John\_Kakouros](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/john_kakouros/32/2813_2.png) [@John\_Kakouros](https://community.glideapps.com/u/John_Kakouros)\
**Post date:** [January 16, 2022, 3:30am UTC](https://community.glideapps.com/t/stop-bookings-if-event-number-full/37252/11 "2022-01-16T03:30:29Z")

</div>

A user has selected an event to register. The following form is displayed

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/0/e0df238d127a57761707c7daea2b7ce42dbfe951.png)  
Form  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/4/64ba5fcce38709b3eb21ced9aec925fb417994e0.png)

They then click the attending tickbox

When the form is submitted I want to check if their booking will exceed to Max Number for the event value which is stored in the Event table. I know how to display a message. What I cannot figure out is how to check the Max booking value that is stored in the Events table

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [January 16, 2022, 3:34am UTC](https://community.glideapps.com/t/stop-bookings-if-event-number-full/37252/12 "2022-01-16T03:34:05Z")

</div>

you should prevent users from getting to that form… hide the button for that form if the event is fully booked… or create a custom form, using show a new screen action, that you can control, not a native Glide form

---

<div class="post-metadata">

**Author:** ![John\_Kakouros](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/john_kakouros/32/2813_2.png) [@John\_Kakouros](https://community.glideapps.com/u/John_Kakouros)\
**Post date:** [January 16, 2022, 3:48am UTC](https://community.glideapps.com/t/stop-bookings-if-event-number-full/37252/13 "2022-01-16T03:48:01Z")

</div>

Thanks for your help. I will try it out
