web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

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 386

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:
I have the same question (0)
  • Verified answer
    v-mengmli-msft Profile Picture
    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,935 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
    386 on at

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

  • Jap11 Profile Picture
    386 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard