
Hi!
I'm making a training registration app with three different trainings in the form, along with different dates/times depending on the class selected. I am having trouble with capping each date/time option for each class choice at 20 attendees. The class options are all on the same form, but have filtered views dependent on the class chosen.
This is what I have so far for the first class date/time choices option.
If(CountIf('Date/TimeLabel_6'.Text=DataCardValue4.Selected.Value>20,Notify("Class has reach maximum capacity!, please select another date",NotificationType.Error),SubmitForm(RegistrationNewForm);NewForm(RegistrationNewForm);Notify("Registration Successful", NotificationType.Success, 3000;Navigate('Home Screen'))
Does anyone have any advice as to what I am doing wrong? Or has anyone successfully done this in the past?
Thanks in advance!
Hi - Can you tell us more about the schema (and data source) you are using?
Typically, you want to store the registrations in a table/list and do your check (e.g. CountIf) on that source. You should also be able to deactivate/unlist sessions that are full, so you could avoid any messaging.
Lastly, you might want to consider a "Wait List" option - so that when then count is over 20, folks could still sign up, but the status of their registration would be "Wait Listed" instead of "Confirmed".