Im building a simple app to handle event registration forms in SP list. I have 4 events with two dates for each. Im looking for an option to add counter for each event occurrence as I need to limit attendees to 12 per session. Once the limit of 12 is reached I will disable the button for selecting the corresponding date. Is this achievable? Thank you in advance for your help
Solved! Go to Solution.
Hi @SectorOMEGA ,
You would use CountRows() in conjunction with a filter
If(
CountRows(
Filter(
SPList,
EventName = YourEvent &&
DateField = YourDate
)
)>12,
Notify("Event full")
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi @SectorOMEGA ,
Create value for a Variable on each button OnSelect
Set(gblButton,1)
and so on for the rest. The value of gblButton (it will be numeric) will be the number of the button last pressed.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi @SectorOMEGA ,
You would use CountRows() in conjunction with a filter
If(
CountRows(
Filter(
SPList,
EventName = YourEvent &&
DateField = YourDate
)
)>12,
Notify("Event full")
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
@SectorOMEGA you can do a Count on the SP list like this,
If(CountRows(yourSPList, Event=yourSlectedEvent && Date=yourSelectedDate)=12, DisplayMode.Disabled, DisplayMode.Edit)
This code will go in the DisplayMode property of the button.
Hope this helps!
@WarrenBelz Always here to help! Thank you so much! Just need to figure out how to place date in button and push it to the SP List 😄
Thank you so much! This was fast!
@WarrenBelz Just trying to figure out the proper way to use the code that you have provided me so kindly. I have created a screen with 4 separate sections for the events. Each event has two available days which I have added as buttons made on pop up screen. I have created also a form that the date buttons navigate to in order to allow users to register themselves. How ever Im trying to figure out in this set up how to pass the selected date to the registration form in order to be able to count the people subscribed to it. Really appreciate the help and thank you in advance
Hi @SectorOMEGA ,
What is the actual code you are using - the date would be where I have YourDate
So basically I have this:
And when a user is hitting the date button it navigates them to registration form based on the SP fields. Date 1 and Date 2 will be replaced with the respective dates and I want to pass the selected date to the registration form. If its possible I can Reuse one form screen only, if not I will hardcode the date in 8 different forms for registration in order to have it there and then try to setup the counter. Hopefully I have managed to explain it
Hi @SectorOMEGA ,
Getting down to basics here:-
So going back to the code I originally posted, if you ran this on the DisplayMode of the button
If(
CountRows(
Filter(
SPList,
EventName = YourEvent &&
DateField = YourDate
)
)>=12,
DisplayMode.Disabled,
DisplayMode.Edit
)
Have I misinterpreted anything in the above?
The Navigation should not be relevant (although I must admit I cannot fully visualise your model from the description you have provided).
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
@WarrenBelz The thing that Im not getting is this:
EventName = YourEvent && DateField = YourDate
Where this property will go in the registration form as I want them to be hard coded in the registration form. I have tried passing the date to registration form with putting the date as Default date for the DateField, and for the counter function I have used:
CountIf('SPList', EventDate = 06/20/2021)
But still stays 0
Im making simple label boxes that Im putting all the info for the event and Im splitting the screen in 4 equal parts for the event. Making me think I will need to make separate registration form for each event.