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 / Patch For All from a c...
Power Apps
Answered

Patch For All from a collection to a document library

(0) ShareShare
ReportReport
Posted on by 377

Hi there

I have a collection reading a document library and which to patch one column to the library items.

 

The Collection is of Images with a number column "ReportID".  I filter the reports by the ID which is set by a variable "varReportItem.ID"   I which to update the Number column called "PicNumber" in the Document library which AARowNumber which a column I added.  I do not get an error but they do not  update.

ForAll(
 colreportImages,
 Patch(
 ReportImageLibrary,
 LookUp(
 ReportImageLibrary,
 ReportID = varReportItem.ID
 ),
 {PicNumber: AARowNumber}
 )
)

 

Look forward to some help, thanks.

Categories:
  • Verified answer
    SaiKrishnaGudluru Profile Picture
    499 on at

    probably you may need to change the Patch condition

     and provide how the colreportImages looks like to have a better idea

    ForAll(
     colreportImages,
     Patch(
     ReportImageLibrary,
     LookUp(
     ReportImageLibrary,
     ReportID = <<It should go ID from colreportImages>>
     ),
     {PicNumber: AARowNumber}
     )
    )
  • StuCundy Profile Picture
    377 on at

    Hey @krishnags 

     

    Your were right.  was an easy fix...you can me some clarity.

    ForAll(
     RenameColumns(colreportImages,"ID","ID1"),
     Patch(
     ReportImageLibrary,
     LookUp(
     ReportImageLibrary,ID=ID1),
     {PicNumber: AARowNumber}
     )
    )

     

  • UdayAdhikari Profile Picture
    450 Most Valuable Professional on at

    Hi @StuCundy, or may be AARowNumber is not set up properly in the collection. I just tried below code and it worked for me. (replace collection, list name and column names to yours)

     

    ClearCollect(
     colreportImages,
     {
     ReportID: 1,
     AARowNumber: 2
     }
    );
    Set(
     varReportItemID,
     1
    );
    ForAll(
     colreportImages,
     Patch(
     List1,
     LookUp(
     List1,
     ID = varReportItemID
     ),
     {NumField: AARowNumber}
     )
    )

     Please click Accept as solution 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 Thumbs Up.

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 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard