Hello, I am trying to create an app for training classes and have limits on the number of people who can sign up for the class. Once the class is full I do not want it to show up as an option anymore for people to sign up.
I am thinking a filter on a list of classes might work but can’t figure out how to get the total number of signups already paid for on that particular class.
Does anyone know how to do this or have an alternative way of doing this? Thank you!
@djamison you can disable the signup button when the total registration count is equal to or greater than the allowed limit. In order to do this, you can do the following:
For each session, have a field with max allowed users.
Another field to have Registered users count
On the session registration page where you have the button, each time a user registers for the session, add +1 to the registered users count
Set visibility condition to the signup button to only show when the registered users count is <= max allowed count.
As an extra step, you can add another button to show sold out only when all the sessions slot have been booked.
I have a lot of classes (15-20 per month) so I do not want the classes to show in the list at all if they are fully booked.
From your feedback I figured out how to keep track of the number of paid registrations on the class by using the +1 formula so now on the class collection it is automatically updating the “Class Signups” column (in the attachment below). The “Class Capacity” column is just a number I enter when I create the class.
There isn’t an option for that. In the second option where it says “Empty” right now, I can only do a sum or one of the other options in the screenshot. Which I believe is summing up all of the classes capacities, not just the individual class. When I tried one of these options, no classes showed up in the list.
Yup, that’s why you’re not seeing the class signups and class registrations for filtering, because these fields are in Training Classes and not in Class Type.
Can you share your collections structure to understand this better please?
Here’s how you can implement the filter and get the result you want.
Each time a user register for a training class, update the count of registered users with +1
Add another action immediately after the counter increment step to check if the registered users >= capacity & update the table with True/False (i.e. class is full or not-full)
Now, add the filter to your list to show only classes that are not tagged as Full.