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 / Loop for collection
Power Apps
Answered

Loop for collection

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Let us consider a table, the goal is to loop through it in order to retrieve all the elements containing a certain ID (inside the "ID" column). To make an analogy, the RemoveIf commands would suppress all the elements containing the specified ID, well here I'm looking for a sort of CollectIf, that would do the same, but instead of suppressing it would add.

Categories:
I have the same question (0)
  • Verified answer
    timl Profile Picture
    37,229 Super User 2026 Season 1 on at

    Hi @Anonymous 

    Unless I misunderstand you, you can accomplish this by collecting the output of the Filter function.

    ClearCollect(MyCollection,
     Filter(MyTable, IDColumn=1)
    )

    The function above will add all records from MyTable into a collection called MyCollection, where MyTable.IDColumn=1.

     

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 316 Most Valuable Professional

#2
11manish Profile Picture

11manish 242

#3
Valantis Profile Picture

Valantis 198

Last 30 days Overall leaderboard