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 / Updating Gallery Shopp...
Power Apps
Answered

Updating Gallery Shopping Cart Qty and Order Totals through patch and

(0) ShareShare
ReportReport
Posted on by 34

Can't figure out why this gallery only updates on the second "Save"

Basic Needed flow

-items in collection ShoppingCart

-User needs to update qty and selects "Edit"

-User updates "Qty" and Selects "Save"

-Item Qty and Cost are updated on collection gallery

-Total Order Cost is updated

Initial Screen

First screen.gif

 

Selecting Edit

SecondScreen.gif

 

Updating Qty and Selecting Save

ThirdScreen.gif

 

Having to do "edit' "save" AGAIN to get "Order Total" to update

ForthScreen.gif

 

Thoughts? Solutions?

 

Thanks

Scott

Categories:
I have the same question (0)
  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at

    A few questions: 

    1. Do you have some code in the OnChange of the Quantity text input control? 
    2. When you enter a number in the Quantity text input, do you directly click on the Save button? If so, what happens when you tab out of the text input box and then click on Save? 

    Let me know the answers and we can take it further.

     

    ---
    If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

     

    Thanks!

    Hardit Bhatia

    Microsoft Business Applications MVP

    Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

  • Scuddersm Profile Picture
    34 on at

    Hardit,

     

    There is no code in the "OnChange"  If I tab out of the "input box" the result is the same as if I select "save" directly after the change. The updated "Qty" is changed, but the "Order Total" doesn't update unit I do "edit" and "save" again.

     

    Scott

  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at

    Would you mind sharing the code that you have for calculating the Order Total? 

     

    ---
    If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

     

    Thanks!

    Hardit Bhatia

    Microsoft Business Applications MVP

    Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

  • Scuddersm Profile Picture
    34 on at

    Hardit,

    Its above this image.

    "$" & Text(Sum(CartTotalCost), "[$-en-US]###,###.00")

    ThirdScreen.gif

    Scott

  • Verified answer
    PowerAddict Profile Picture
    7,316 Most Valuable Professional on at

    One last question (and apologies for missing the previous image): 

     

    The expression you have for calculating the cart total, what exactly is CartTotalCose? Is that a column in your collection? Have you tried using the Sum expression in a diff way? 

    Sum(Gallery.AllItems, Value(QuantityTextBox.Text)*UnitPrice)

     

    Let me know if this helps. 

     

    ---
    If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

     

    Thanks!

    Hardit Bhatia

    Microsoft Business Applications MVP

    Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

  • Scuddersm Profile Picture
    34 on at

    Hardit,

     

    CartTotalCost is a column in the collection, but I took your advice and tried summing the field a different way.  It now updates as soon as the quantity is changed, which is great.  I'll probably just leave it now that its functional.  Thanks for your help. 

    Seems that there are just too many ways to calculate values.  This is what I ended up writing in, which includes the text mask.

    "$" & Text(Sum(CartGallery.AllItems, Value(CartQuantity.Text)*Value(CartUnitPrice.Text)),"[$-en-US]###,###.00")
    

    Thanks again for the help.  Now on to the next problem.

    Scott

     

  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    Glad I could help! Good luck with the rest of your app! Feel free to reach out in case of any questions!

    Thanks,
    Hardit Bhatia
    The Power Addict
    https://thepoweraddict.com

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 494

#2
WarrenBelz Profile Picture

WarrenBelz 352 Most Valuable Professional

#3
11manish Profile Picture

11manish 323

Last 30 days Overall leaderboard