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 / Add values from + and ...
Power Apps
Answered

Add values from + and - from a dynamic input

(0) ShareShare
ReportReport
Posted on by 37

 

Hello,

I need some help please, I am stuck in understanding how can I +/- 1 from Quantity.
The idea is that I have a gallery called Add order and the field Text input called Quantity. This is added manually by user and it's stored at the end when the user selected what he wants to buy.

My problem: I need to have 2 options, one where the Quantity is selected and entered a random number and one where from the entered number I can do +/- 1.

Ex: The customer will add 22 pieces of crayons but he wants 24. I need to let him possibility to add +1 by using the button +

Categories:
  • Verified answer
    Ethan_009 Profile Picture
    4,840 Moderator on at

    Hi @boarder ,

     

    Are you saving the data when you enter the Quantity?

    I want to know if the gallery in your screenshot is using editable grid or updating actual records?

     

    For saving the records:

    //Code for '+' Icon/Button
    Patch(<datasource>, ThisItem, {Quantity: Value(ThisItem.Quantity) + 1})
    
    //Code for '-' Icon/Button
    Patch(<datasource>, ThisItem, {Quantity: Value(ThisItem.Quantity) - 1})

     

    If you are not updating records instantly and saving in collection, then you can add info in collection then patch entire collection:

    Note: Include Unique column ID for updating existing records.

     

    Hope this helps

  • boarder Profile Picture
    37 on at

    I am not saving the data and it's editable grid. How can I do it with collection? 

  • Ethan_009 Profile Picture
    4,840 Moderator on at

    Hi @boarder ,

     

    This video will be helpful or you to handle records using Collection

    YouTube Link

     

    Hope this helps

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