Hi,
I have repeater in my basket which shows all added items. Every row has “x” buttom to remove item from basket.
When I remove item from basket the TOTAL sum must be actualized to sum without this item.
Intercation on clik I added inverse what I have when I add to basket: [[(TotalPrice-Item.Price).tofixed(2)]], also tried “[[TotalPrice-Intem.Price]]” and it doesn’t works.
Can’t you just subtract the value from the widget displaying the total using the value of the relevant field in the row that’s being deleted when the “x” button is clicked?
I assume you are increasing the total displayed by that widget when you add items, after all.
I don’t know if I correctly understand you, but I have my basket in repeater and the item’s price is in column Item.Price and widget dispalying sum has value TotalPrice. I was substarting something like this: TotalPrice-Item.Price but it doesn’t work. Maybe do you mean to substract from the names from widgets?
I upload a rp file, but it isn’t in english language but variables are in english. You need to add items to the basket on the right and from this I want to remove them. On the left of the egreen button is total price.
I have 2 variables:
“NumberOfProducts” which saves values of number of added thins and “Total Price” which contains a sum of all items.
I did interaction On Click on “x” and when i remove an item so i reduce item by one so i do : set variable value> target: NumberOfProducts > seto to : value> [[NumberOfProducts-1]] and second Set Text to> value of variable> and place when my number is changing.
I also did the same with Total: set variable value>set to value: [[ (TotalPrice -Item.price ).tofixed(2) ]] , where my Item.price is from column in my basket repeater and set text> where you have the sum.
On last I add : Delate rows from my basket repeater