cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MiniMe_83
Helper IV
Helper IV

Gallery Update - Patch function

Hi,

 

I'm curious to know whether I can update / patch the "Title" fields of all the items / rows being displayed in a filtered gallery connected to a SharePoint list?

 

The idea is so that all Title fields read the same after a toggle button is selected. I've had a look but can't seem to get this one right:

Patch('SharePoint List',Gallery.AllItems.Title,TextInput1.Text)

 

Hopefully this is pretty straight forward.

 

Thanks for your help  

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @MiniMe_83 ,

Try this

ForAll(
   Gallery.AllItems As aPatch,
   Patch(
      'SharePoint List',
      {ID:aPatch.ID},
      {Title:TextInput1.Text}
   )   
)

 

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.

Visit my blog Practical Power Apps

View solution in original post

3 REPLIES 3
WarrenBelz
Super User
Super User

Hi @MiniMe_83 ,

Try this

ForAll(
   Gallery.AllItems As aPatch,
   Patch(
      'SharePoint List',
      {ID:aPatch.ID},
      {Title:TextInput1.Text}
   )   
)

 

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.

Visit my blog Practical Power Apps

gabibalaban
Dual Super User
Dual Super User

@MiniMe_83 ,

If we are talking about a large amount of data (many rows in Gallery), try this approach:

 

Patch(YourSharePointList,
      ForAll(Gallery.AllItems,{ID:ID,Title:TextInput1.Text})
)

 

 Hope it helps !

Thanks @WarrenBelz ..... works as expected!

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (1,783)