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 over and remove r...
Power Apps
Answered

loop over and remove records from collection in power apps

(0) ShareShare
ReportReport
Posted on by 114

I want to loop over a collection and in the end of a loop it will remove the the current record from the collection and move on to the next record, when i use

 

forAll and Remove in the same forAll it says that remove can not have the same data source as froAll, what can i do do achieve what i want?

 

my main objective is to loop over a collection and get their values( First(Collection).Value ), is there a better way to do this ?

Categories:
I have the same question (0)
  • Verified answer
    v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @GTurkistane ,

     

    Could you please share more details about your scenario? What do you mean by remove current record? If you would like to get values from a collection then clear it, the formula is simple:

    ClearCollect(col2, Collection1.Value); Clear(Collection1)

     

    Best regards,

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 413

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
timl Profile Picture

timl 315 Super User 2026 Season 1

Last 30 days Overall leaderboard