cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Scuddersm
Frequent Visitor

Updating Gallery Shopping Cart Qty and Order Totals through patch and

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

1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

7 REPLIES 7
PowerAddict
Super User II
Super User II

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

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

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

Hardit,

Its above this image.

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

ThirdScreen.gif

Scott

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

View solution in original post

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

 

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

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (5,021)