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 / Inventory App, '+' and...
Power Apps
Answered

Inventory App, '+' and '-' buttons to change quantity

(0) ShareShare
ReportReport
Posted on by 453

Hello,

 

I'm building an inventory app to manage stock and I want to include a '+' button and '-' button to change the quantity of stock for an item, i'm wondering if this is possible?

 

The data card I need to change is: Quantity_DataCard2

The value that needs changing is: DataCardValue15

 

JoshPullan11_0-1715073984338.png

 

I'm guessing I need to add some formula to the OnSelect for each of the buttons, but anything I have tried so far only removes the value completely.

 

Any help would be appreciated!

 

Cheers

Categories:
  • Verified answer
    v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi @jap11 ,

     

    What is Default of DataCardValue15? Parent.Default or ThisItem.Quantity?

    If so, please try this.

    OnVisible of screen.

    Set(count,0)

    Add an Up arrow and set the OnSelect of it.

    Set(count,Sum(count,1))

    Add a down arrow and set the OnSelect of it.

    Set(count,Sum(count,-1))

    Default of DataCardValue15

    Sum(Value(Parent.Default),count)

    vmengmlimsft_0-1715075792965.png

     

     

     

     

    Best regards,

    Rimmon

  • Gochix Profile Picture
    1,937 Moderator on at

    @jap11 ,

     

    You could set the InputField Default property to variable varQuantity.

    Set the varQuantity value on your record value when record is retrieved:

    UpdateContext({varQuantity:LookUp(SP,ID = Gallery.Selected.ID,Quantity})


    On + button set the OnSelect property to UpdateContext({varQuantity:varQuantity+1})
    _____________________________________________________________________________________
    Please give a thumbs up if I resolved your issue! Please click Accept as Solution to close the topic!


  • Jap11 Profile Picture
    453 on at

    Hi @v-mengmli-msft  - this worked, thank you very much.

  • Jap11 Profile Picture
    453 on at

    Hi @v-mengmli-msft - thanks again for your help yesterday! I hope you don't mind me asking but I've raised another related question earlier today so wondered if you may be have an idea on that also?  Here is the link: https://powerusers.microsoft.com/t5/Building-Power-Apps/Audit-Log-for-Inventory-App/m-p/2746088/emcs_t/S2h8ZW1haWx8dG9waWNfc3Vic2NyaXB0aW9ufExWWFZCN1FLSzYwSTFOfDI3NDYwODh8U1VCU0NSSVBUSU9OU3xoSw#M673756

     

    No problem if not but figured it was worth a shot!

     

    Thanks!

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard