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 / how can I get a field ...
Power Apps
Unanswered

how can I get a field value of a previous entered line in Sharepoint based on powerapps?

(0) ShareShare
ReportReport
Posted on by 2

Hello power Apps Team ^^

I hope someone can help me because I am struggling for a few days...

  • To start, I created an event Sharepoint list composed of these fields:
Event NameMin number of ParticipantsMax Number of Participants
Text fieldNumberNumber

- Then, I created another SharePoint list called Inscription with these fields:

Event NameAttendeeMin ParticipantMax ParticipantStatusRecurrence
Lookup from event Listtext fieldLookup from event ListLookup from the event listConfirmed or Cancelledcalculated 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,

Sabrina

Categories:
I have the same question (0)
  • C-Papa Profile Picture
    1,836 on at

    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))

  • Sabrina1988 Profile Picture
    2 on at

    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...

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 914

#2
11manish Profile Picture

11manish 627

#3
Valantis Profile Picture

Valantis 598

Last 30 days Overall leaderboard