web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard