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 / How to Patch new Galle...
Power Apps
Answered

How to Patch new Gallery Item/s with a blank ID to a Collection

(0) ShareShare
ReportReport
Posted on by 107

I have a collection from a sharepoint list. I also have a gallery with items from the collection so whenever I patched/add new item/s to the collection, it'll automatically reflect to the gallery adding new rows. How do I patched all the items in the gallery including the old ones to the Sharepoint list? I tried doing the one below but won't work because new items have blank col IDs. Still fairly new to PowerApps so any help or workaround is appreciated.

 

ForAll(
 RenameColumns(
 price_gal.AllItems,
 "ID",
 "IDD"
 ),
 Patch(
 MainList,
 LookUp(
 Filter(
 colPrice,
 'Item No.' = _Selected.'Item No.'
 ),
 ID = IDD
 ),{...}))

 

 

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

    Hi @rzainm ,

     

    Do you want to patch all the items in the gallery including the old ones to the SharePoint list? In SP, the ID column is automatically generated and cannot be modified, I recommend that you set a column with no duplicate value to mark each record, such as the Title column. Maybe you can try this:

    ForAll(Gallery.AllItems As C, If(!isBlank(LookUp(List,Title=C.Title)),Patch(List,LookUp(List,Title=C.Title),C),Patch(List,Defaults(List),C)))

     

    Best regards,

    Rimmon Li

  • v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi @rzainm ,

     

    How is the situation? Have you solved your problem?

    If you find my answer helpful, you can accept it as a solution to help more people trapped in this problem.

     

    Best regards,

    Rimmon Li

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 549 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 225 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 224

Last 30 days Overall leaderboard