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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Nested For All Loops
Power Apps
Unanswered

Nested For All Loops

(1) ShareShare
ReportReport
Posted on by 61
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
    153,040 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard