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 / Summarize values via U...
Power Apps
Unanswered

Summarize values via UpdateContext

(0) ShareShare
ReportReport
Posted on by 6

Hi, I create the app which will be possible to summarize the quantity if details. My SharePoint list looks like this:

 

WorkOrder                             Quantity

00000333                               133

00000343                               451

 

The task is to summarize the total quantity (DataCardValue22) of details continuously during a day. For example,  for work order 00000333"1+32+51+49=131" etc.

To solve it I created a "TextInput" in the EditForm for new values and created an "Add" button. OnSelect of this button has such formula:

 

UpdateContext({var:TextInput3+DataCardValue22})

 

The formula works good. there is no problem with summarizing but the problem is that the total quantity stays the same for each work order when I open an EditForm - in other words, for each new work order the total quantity equals to the last calculated value.

 

Please help, how can I calculate the separate quantity in accordance with the proper work order?

Should I use any Filters or Patch function?

 

Please if you have any ideas give a feedback.

Also see the attached images for more information. Thank you!

 

Capture.JPG
Capture123.JPG
13432.JPG
Categories:
I have the same question (0)
  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @PavelKrayushkin ,

     

    Do you set var variable to the total quantity?

    This issue is due to the var variable , the variable still store the last total quantity , you need to reset the variable when you open an new EidtForm.

    Please put the following formulas to OnSelect of Button that open an new EditForm.

    UpdateContext({var:Blank()})

    Hope this can help.

    Best regards,

    Sik

    If my post is helpful for you, please click on “Accept as Solution” to help other members find it more quickly.

  • PavelKrayushkin Profile Picture
    6 on at

    Thank you for your advice, but that is the problem - a can't just reset this information because I need to make some changes in my EditForm and each total quantity must be summarized. The issue is to make a conformity between the total quantity and the appropriate work order 😣

     

    If you have time please look at the attached images - the first is my DetailScreenForm which is used to make changes with already inserted data. When I press "Edit" button I come to my EditForm and as you can see the "accepted" field is not equal for these both screens - for EditForm this quantity is equal to the last total quantity, as you mentioned before.

     

    How can I save this quantity in accordance with its workorder? Is it possible?

     

    Thank you

    tempsnip.png
    tempsnip2.png

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,074

#2
Valantis Profile Picture

Valantis 639

#3
11manish Profile Picture

11manish 606

Last 30 days Overall leaderboard