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 / Patching to a Sharepoi...
Power Apps
Unanswered

Patching to a Sharepoint List

(0) ShareShare
ReportReport
Posted on by 224

Hello,

 

I'm creating an app that has a set list of items (chips, soda, etc) that is used to keep track of how many of each item is used and needs to be replenished.

 

I am trying to patch the collection back to the data source (sharepoint list). I need to update the "Needed" column in the sharepoint list with the amount needed, so as the app is used, the data source would be sorted by the items used most.

 

Below is what I have, and I'm pretty sure it's correct, but I'm not sure how to get the sum function to work. I feel like I'm super close, but can't figure out the formating for the sum function?

 

Patch('Stock List', First(Filter('Stock List', Title=BrowseGallery2.Selected.StockColStock && StockType=BrowseGallery2.Selected.StockTypeColStock)), {Needed: Sum(Needed,TotalNeeded)})

Categories:
  • zmorek Profile Picture
    3,272 on at

    Consider removing the "First/filter" part of your formula, that's a performance hit you don't need to take.

     

    Patch('Stock List', LookUp('Stock List, Title = BrowseGallery2.Selected.StockColStock && StockType=BrowseGallery2.Selected.StockTypeColStock)........

     

    What error are you getting with your Sum() function?

  • as733y Profile Picture
    224 on at

    Hi @zmorek ,

     

    Do you know why this ForAll function isn't patching all my items in my collection?

     

     

    ForAll(ColTotal,Patch('Stock List', LookUp('Stock List',Title=BrowseGallery2.Selected.StockColStock && StockType=BrowseGallery2.Selected.StockTypeColStock),{Needed: TotalNeeded}))

     

     

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 330

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard