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 / Patching Collection
Power Apps
Answered

Patching Collection

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi there,

 

I have a Sharepoint list of student names entitled 'Student Lockdown Register'. In the event of an emergency, you can filter the students by name etc. and add them to a new list ready to be bulk updated in Sharepoint. This is displayed in a Gallery so you know what students you've already selected, there are no duplicates.

 

The new list is a Collection entitled NewTable. It stores everything under the same name (e.g FullName as FullName) however I have tried using different column names that are different.

 

On select of a button, I want to update the students in the NewTable with the words "Accounted For" under the column Register.

 

I just cannot seem to do it. I've tried Patch, For All, UpdateIf etc and nothing seems to work. As a beginner, I'd appreciate some guidance if anyone can help!

 

I've tried:

ForAll(NewTable,Patch('Student Lockdown Register',LookUp('Student Lockdown Register',ID=NewTable[@ID],{Register:"Accounted For"})))

 

Among others that I've lost count of!

 

 

 

Categories:
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @Anonymous 

     

    Can you try to update the expression as:
    UpdateIf(TestTable,true, {Register:"Accounted For"})
     
    Note: If you are collecting data in a collection, this will remain until the current session only or if the collection is refreshed anywhere in the app.
     
    Hope this Helps!

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @yashag2255 

     

    Sorry, I don'y think I made myself clear, but thank you for your response!

     

    I need to patch the collection (entitled NewTable) back to Sharepoint, just with Register (which is currently blank) to now read 'Accounted For' however I could update it to read 'Accounted For' in the Collection if that helps.

     

    With the answer you wrote, how does it know to patch back to the Sharepoint list? 

     

    Thanks

  • Verified answer
    yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @Anonymous 

     

    To update the results to Sharepoint, you may need to update the expression as:
     
    ForAll(RenameColumns(TestTable,"ID","ID1"), Patch('Student Lockdown Register',LookUp('Student Lockdown Register',ID = ID1),{Register:"Accounted For"}))
     
    Hope this Helps!
     
    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    You're fantastic! I spent far too long trying to figure that one out!

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard