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 / Nested For All Loops
Power Apps
Answered

Nested For All Loops

(1) ShareShare
ReportReport
Posted on by 63
Hi 
 
I have a canvas app in which I am trying to eliminate the duplication of participants in a session:
 
 
I have a collection of the existing participants and then I want to loop through this and within this loop, loop through the selected items of a combo box and see if the values are the same, and if they are don't add them 
 
I can't figure out how to reference the first collection within the second part of the loop:
 
ForAll(colParticipants,ForAll(GroupWorkAddYP.SelectedItems,If(ThisRecord.YPID=colParticipants.Value)))
 
 
Any advice is appreciated
 
 
 
Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    156,119 Most Valuable Professional on at
    This will get the selected items in the drop-down that are not in the collection. 
    Filter(
       GroupWorkAddYP.SelectedItems,
       !(YPID in colParticipants.Value)
    )
    Are you wanting to then add them to the collection ?
    ForAll(
       Filter(
          GroupWorkAddYP.SelectedItems,
          !(YPID in colParticipants.Value)
       ),
       Patch(
          colParticipants,
          {Value: YPID}
       )
    )
     
    Please click Does this answer your question 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 a Like.
    MVP (Business Applications)     Visit my blog Practical Power Apps    Buy me a coffee

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 326 Most Valuable Professional

#2
11manish Profile Picture

11manish 168

#3
sannavajjala87 Profile Picture

sannavajjala87 75 Super User 2026 Season 1

Last 30 days Overall leaderboard