cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sajarac
Super User
Super User

Set a value from another table

Good morning,

Quick question?

I have 2 Share point list, 1 is my order list and the other one is the products in order.

In my order lists I have a field Named = Total Products and basically I just manually populate the total of products for that order in my other list.

 

Now in that field I have changed to the following formula:

 

Total Product = Sum(Screen2.AllItems, TotalProducts)

 

Everything is fine I can get the total of my products the only thing that is bothering me is If I want to see the value of total products saved in my SPL "Orders" then I have to edit my form and save it. otherwise I see the value in the file but not in the list.

 

I think that setting that value "the total products" could resolve the issue?

And other thing sometimes takes longer for that field to show the value.

 

Could someone point me in the right direction?

 

thank you kindly. 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @sajarac ,

You can use Patch from a button - assuming your item is selected from another gallery

Patch(
   'SLP Orders'
   {ID:YourMainGallery.Selected.ID},
   {YourTotalField:Sum(OrderGallery.AllItems,Quantity)
)
   

 

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.

View solution in original post

3 REPLIES 3
WarrenBelz
Super User
Super User

Hi @sajarac ,

If you are asking should you write the total back to the list, then yes, that is a good idea? Is this the issue?

 

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.

Hi, sorry the question is wrong formulated.

 

My data card value that feeds the SLP Orders is getting the information from another table using: Sum(OrderGallery.AllItems, Quantity)

I can see the value from that gallery in my field but if fact if I want that value saved in my list Orders I have to put the form in Edit Mode then Save.

 

Will this action affect performance? I notice that it takes 1-2 seconds for the value to load the "sum". 

 

I thought I can set a variable but I have no idea.

 

Make sense?

 

Thank you kindly 

Hi @sajarac ,

You can use Patch from a button - assuming your item is selected from another gallery

Patch(
   'SLP Orders'
   {ID:YourMainGallery.Selected.ID},
   {YourTotalField:Sum(OrderGallery.AllItems,Quantity)
)
   

 

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.

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (2,983)