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 / Updating multiple list...
Power Apps
Answered

Updating multiple list items in powerapps

(0) ShareShare
ReportReport
Posted on by 39

HI All, 

 

Wondering if anyone can help with following, i have a list which has a number of items in, i also have a choice field called Review with the following choices:

In Progress

Completed

Archive

 

how do i set all Completed items to Archive? i was playing around with the following:

ForAll(Filter('Quarterly Reviews', Review.Value = "Completed"), Patch('Quarterly Reviews', LookUp('Quarterly Reviews', ID = 'Quarterly Reviews'.ID), {Title:"1211111111"}))

 

i know i'm updating the title but if i could only identify items to update then i can easly change the column. 

 

Thanks in Advance

 

Categories:
I have the same question (0)
  • Verified answer
    wyotim Profile Picture
    2,545 on at

    Hey @Ardian, I think the issue may be that you are trying to loop through the same data source you are writing to, and PowerApps doesn't like that so much. Maybe try something like this:

     

    // Collect the items to loop through
    ClearCollect( colFilteredQuarterlyReviews, Filter('Quarterly Reviews', Review.Value = "Completed") );
    // Perform the loop ForAll( colFilteredQuarterlyReviews, Patch( 'Quarterly Reviews', LookUp( 'Quarterly Reviews',
    ID = colFilteredQuarterlyReviews[@ID] ), { Title:"1211111111" } ) )

    Once you get the loop right, the rest is just setting the data you want to patch given the condition set in the previous collection. Let me know if I didn't get this right; I just did this off the cuff and may have messed up the syntax somewhere.  

  • Ardian Profile Picture
    39 on at

    Hi @wyotim That worked perfectly, i had the following, which was also not working:

    ClearCollect(ReviewsToPatch, Filter('Quarterly Reviews', Review.Value = "Current")); 
    ForAll(ReviewsToPatch,Patch('Quarterly Reviews', LookUp('Quarterly Reviews', ID = ReviewsToPatch.ID), {Title:"1211111111"}))

    I can see what you did with the collection ID which solved the issue. 

     

    I changed wording but i did a test exactly as you sent it and syntax was all correct

     

    Thank you for your help. 

  • wyotim Profile Picture
    2,545 on at

    Awesome! Happy it worked for you!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Just made good use of this.  Thanks @wyotim for the solution and @Ardian for asking the question!

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

#2
11manish Profile Picture

11manish 193

#3
Valantis Profile Picture

Valantis 138

Last 30 days Overall leaderboard