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 all filtered ite...
Power Apps
Answered

Patch all filtered items in a gallery to a new SharePoint List

(0) ShareShare
ReportReport
Posted on by 4

I am struggling with the code to Patch all filtered items from a Gallery to a different SharePoint List.  For example, there are 5 filtered items in Gallery2 and I would like each of those records to be patched to the new SharePoint list which is called RouteItineraryList.  Currently it works but only copies the first 'Selected' item 5 times.  How can I accomplish this? I am assuming it has to do something with the .Selected but could use some help!

 

ForAll(
 Gallery2.AllItems,
 Patch(RouteItineraryList,
 {Title:Gallery2.Selected.Title,
 'Route Name':Gallery2.Selected.'Route Name',
 'Itinerary Creator':User().Email,
 'Distributor Dealer Number':Gallery2.Selected.'Distributor Dealer Number',
 'Retail Customer':Gallery2.Selected.'Retail Customer',
 'Retail Customer Street Address':Gallery2.Selected.'Retail Customer Street Address',
 'Stop Number':Gallery2.Selected.'Stop Number'
 }
 )
)

 

 

Categories:
  • Verified answer
    VDI Profile Picture
    337 on at

    try below code,

    ForAll(
     Gallery2.AllItems,
     Patch(RouteItineraryList,
     {Title:ThisRecord.Title,
     'Route Name':ThisRecord.'Route Name',
     'Itinerary Creator':User().Email,
     'Distributor Dealer Number':ThisRecord.'Distributor Dealer Number',
     'Retail Customer':ThisRecord.'Retail Customer',
     'Retail Customer Street Address':ThisRecord.'Retail Customer Street Address',
     'Stop Number':ThisRecord.'Stop Number'
     }
     )
    )

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

Last 30 days Overall leaderboard