web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Restrict Registration ...
Power Apps
Unanswered

Restrict Registration Number of Attendees for Multiple Classes

(0) ShareShare
ReportReport
Posted on by 2

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!

Categories:
  • BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    Hi @Whiskey0117 ,

     

    There are multiple issues with your formula, but the main one is with the condition in the If function. Can you please explain how this is supposed to work? What data is in 'Date/TimeLabel_6'.Text and DataCardValue4.Selected.Value?

  • Whiskey0117 Profile Picture
    2 on at

    Hi! @BCBuizer 

    DataCardValue4 is the date/time choice options for 'training 1'

    DataCardValue12 is the date/time choice options for 'training 2'

    DataCardValue14 is the date/time choice options for 'training 3'

     

    I have a gallery which shows the information of individuals that have registered for training 1. DataCardValue6 is the date/time value chosen by the attendee for 'training 1' on that gallery.

     

    I feel like I am making this more complicated than it needs to be, but I am pretty stuck right now!

  • BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    Hi @Whiskey0117 ,

     

    I assume you want the condition to check if more than 20 registrations already exist for the a selected date/time (DataCardValue4.Selected.Value). 

     

    For that you will need to include a filter in your condition, something like:

     

    If(
    
    CountRows( Filter(DataSourceName, 'training 1'.Value = 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'))

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 220 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 189 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 139

Last 30 days Overall leaderboard