Showing results for 
Search instead for 
Did you mean: 
Helper III
Helper III

Quantity Change Buttons

I've been working on an inventory app, and I've encountered a small item I need help tweaking.



The quantity box Stays blank until you start using the arrows, then it starts at 0 and counts up or down. The save button will only submit what the up or down buttons have input. So if i push up 4 times, the number in the box would be 4, but if I type 9 then hit save, 4 is what would be saved. My code is below.


Quantity Text Box= Default : currentQuantityValue

Up Arrow= OnSelect: UpdateContext({currentQuantityValue:currentQuantityValue+1})

Down Arrow= Onselect: UpdateContext({currentQuantityValue:currentQuantityValue-1})

Save Button= OnSelect: 

Patch(PadPartsList, Gallery1_1.Selected, {Quantity:currentQuantityValue});



Form Text Box:




Any Tips would be greatly appreciated. I'm sure It's something about how I have the variable assigned or something. But I'm stumped at the moment.


Super User
Super User


Don't reference the variable in your patch, reference the textinput control.

    {Quantity: Value(yourQuantityTextboxName.Text)}


I hope this is helpful for you.

Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

When I tried that, the Up and Down buttons no longer work and the patch function does not update the quantity at all.


I did try changing the control on the up and down buttons from UpdateContext({currentQuantityValue:currentQuantityValue-1}) to UpdateContext({TextInput3.Text:currentQuantityValue-1}) and also UpdateContext({currentQuantityValue:TextInput3.Text-1}) with no luck.

Memorable Member
Memorable Member


Set OnChange property of your text input control to:


UpdateContext({ currentQuantityValue: TextInput3.Text })


Please click Accept as solution if my answer helped you to solve your issue. This will help others to find the correct solution easily. If the answer was useful in other ways, please consider giving it ‌‌👍


Helpful resources

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (3,646)