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 / How to get number up a...
Power Apps
Answered

How to get number up and down

(0) ShareShare
ReportReport
Posted on by 442

I am trying to find a way to count numbers using an up and down icon with a text input for number.

Screenshot 2023-11-02 160204.png
Categories:
I have the same question (0)
  • LaurensM Profile Picture
    12,516 Moderator on at

    Hi @dylandavis09,

     

    Are you storing the number in a column? With the code below I expect a number column and that the item is being displayed in a gallery:

     

    //OnSelect of the up icon
    Patch(
     Datasource,
     //In case the column schema does not fully match use LookUp(DataSource, ThisItem.ID = ID) instead of ThisItem
     ThisItem,
     //or -1
     {NumberColumn: ThisItem.NumberColumn + 1}
    )

     

     

    If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.

    Thanks!

  • Verified answer
    SpongYe Profile Picture
    5,909 Super User 2026 Season 1 on at

    Hi @dylandavis09

     

    To create a number input with up and down buttons in Powerapps is to use the following steps:

    Create a variable to store the number value. Using the Set function in the OnStart property of the app or the OnVisible property of the screen. 

    Set(varNumber, 0)

    Create two button controls, one for incrementing and one for decrementing the number value. Set their OnSelect properties to update the variable using the Set function.

    OnSelect: 

    Set(varNumber, varNumber + 1)

    Increase the value of varNumber by 1 when the button is pressed.

    OnSelect: 

    Set(varNumber, varNumber - 1)

    Decrease the value of varNumber by 1 when the button is pressed.

     

    If you have any questions or feedback, please let me know. Have a great day! 😊


    -----------------------
    PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]

    I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻

  • dylandavis09 Profile Picture
    442 on at

    Hi @SpongYe !

     

    I did add and test it's still not working. Let me show you screenshot.

    Screenshot 2023-11-02 161306.png
    Screenshot 2023-11-02 161311.png
    Screenshot 2023-11-02 161256.png
  • dylandavis09 Profile Picture
    442 on at

    Hi again @SpongYe! I found it and solved the issue. However, the number remains the same for other items, but I would like different numbers for each item. I see that’s I was wrong about TextInput, should be Label. How it’s work with Label of numbers for each item? Please let me know! 🙂

    Screenshot 2023-11-02 161543.png
  • LaurensM Profile Picture
    12,516 Moderator on at

    @dylandavis09,

     

    A variable will unfortunately not work in this case, you will need to update the number column of that specific row via a Patch() statement. (see first comment)

    This will update your collection or datasource on an item level.

     

    I 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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 342 Most Valuable Professional

#2
11manish Profile Picture

11manish 234

#3
Valantis Profile Picture

Valantis 187

Last 30 days Overall leaderboard