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

How to get number up and down

(0) ShareShare
ReportReport
Posted on by 438

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

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,603 Super User 2025 Season 2 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
    438 on at

    Hi @SpongYe !

     

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

  • dylandavis09 Profile Picture
    438 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! 🙂

  • 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

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard