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 Quantity for ...
Power Apps
Answered

Updating Quantity for Inventory App.

(0) ShareShare
ReportReport
Posted on by 135

Hi All,

 

I'm creating an inventory app and I need a way to easily update the quantity of items. I've seen this question on other forums, but can't find an answer that really works for my app. Below is a snip of my app. I was hoping that the text box would show the current quantity by default, and change accordingly with the use of the up and down buttons. Then when Save is selected, changes would be applied.

 

Bvandyke22_0-1605273570013.png

Bvandyke22_1-1605273629597.png

 

Categories:
I have the same question (0)
  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    Use a variable.

     

    On Item select, set your variable to DataCardValue47

     

    Set(varQuantity, DataCardValue47),   Make sure that your data card value is a number.   It it is text you will have to set it like this:  Set(varQuantity, Value(DataCardValue47))

     

    Text Input default property:  varQuantity

     

    Up Arrow OnSelect:  Set(varQuantity, varQuantity + 1)

    Down Arrow OnSelect: Set(varQuantity, varQuantity - 1)

  • Verified answer
    CU-18081211-6 Profile Picture
    9,272 Moderator on at

    Hi @Bvandyke22 ,

     

    Screen -> OnVisible: UpdateContext({currentQuantityValue:Quantity_DataCard5.Default})

    TextInput3 ->Default: currentQuantityValue

    Icon (plus) -> OnSelect: UpdateContext({currentQuantityValue:currentQuantityValue+1})

    Icon (minus) ->On Select: UpdateContext({currentQuantityValue:currentQuantityValue-1})

    Go to Form1_1 ->Item property and note the variable (lets call it currentItem) from there:

    Save Button ->OnSave ->

              Patch(MidStream, currenItem,  {Quantity:currentQuantityValue});

              ResetForm(Form1_1);

              ViewForm(Form1_1)

     

    Hope it helps !

  • Marc_Gutzwiller Profile Picture
    101 on at

    Thank you for the variable solution @JR-BejeweledOne - it's nice!  
    My problem now is, that it applies to all fields of the gallary. how can i make that only the selected item is going to be changed and not the entire gallary?

    Capture.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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 326 Most Valuable Professional

#2
11manish Profile Picture

11manish 168

#3
sannavajjala87 Profile Picture

sannavajjala87 75 Super User 2026 Season 1

Last 30 days Overall leaderboard