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 / Update a Dataverse Tab...
Power Apps
Unanswered

Update a Dataverse Table based on Gallery Result

(0) ShareShare
ReportReport
Posted on by 86

Hello People! 

 

In my head, this sounds like a simple thing, but unfortunately, I haven't been able to find a solution that easily. Here's what I'm trying to do.

I have an app working just the way I want it. In this app, I have a gallery connected to a table (named 'Inventory') that aggregates the field of a different table (called 'InventoryMovements'). The result of this aggregation is displayed in a text label inside the gallery. Here's a screenshot for reference and the code I used to get that result: 

mjmedina97_0-1679084981978.png


Text(Sum(Filter(Movimientos,MarcaDeProductoBC.MarcaDeProductoPR=ThisItem.MarcaDeProductoPR),Unidades),"0,#")

Pretty neat. The problem is not in the app itself, however.  What I want to do now is to take the results of the sum (For example; 03 in the case of the first item) and patch the table that the gallery is connected to (the 'Inventory' table) based on the item (in this case: Planchita). 

 

Any ideas?

 

 

Categories:
  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @mjmedina97 You can use the same function that you have to do this. Here is an outline,

    ForAll(yourGallery.AllItems,

      Patch(Inventory, LookUp(Inventory, theKeyField=ThisRecord.keyControl.Text (or Value),

              {

                 sumField: Sum(........)

             }

    )

     

    Please remember to give a 👍 and accept my solution as it will help others in the future.

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard