Hello power Apps Team ^^
I hope someone can help me because I am struggling for a few days...
|Event Name||Min number of Participants||Max Number of Participants|
- Then, I created another SharePoint list called Inscription with these fields:
|Event Name||Attendee||Min Participant||Max Participant||Status||Recurrence|
|Lookup from event List||text field||Lookup from event List||Lookup from the event list||Confirmed or Cancelled||calculated en powerapps|
- I am looking to display a popup msg when the number of lines in the inscription list ( status Confirmed)=max number of participants. I created the recurrence field with the following calculation
CountRows(Filter('Enrollment test 2','Event Name'.Value=DataCardValue2.Selected.Value && Status.Value="Confirmed"))
so if I have 5 lines confirmed in the participant list, recurence=5
For the popup msg, it should be displayed if the number of recurrence= max participant for the selected event name.
The question is: how can I get the max number of participants based on previously entered lines related to the same event name? For example, I have 3 existing lines for event line 'Site' ( status Confirmed) with max participants 3. I start creating a new line in Sharepoint with the same event name 'Site'. When I select it and status 'Confirmed', a pop-up msg should appear mentioning that I reached the max number of participants ( lines insharepoints=max participants).
Thanks for any help,
if you create a collection of the event list it can remain in the backgroud without the user seeing it but it can be refred to in your code. try the following for an idea...
Screen OnVisible, ClearCollect(col_events,events)
then on your submit button you could add
Set(var_max_participants, LookUp(col_events, 'Event Name' = DataCardValue2.Selected.Value).'Max Number of Participants'
;If(CountRows(Filter('Enrollment test 2','Event Name'.Value=DataCardValue2.Selected.Value && Status.Value="Confirmed")) <= var_max_participants,Notify( "You have joined the event", NotificationType.Success),Notify( "The event is full", NotificationType.Error))
Thanks for your reply. Yes, it works with a button :)However, I need to display this error notification when this condition is true(>Max participants) with event name and status selected during the new item creation in the inscription list.. is it possible without using a button? I don't figure out how to do it without the onselect button option...
Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.
Your chance to join an engaging competition of Power Platform enthusiasts.