Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

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.

  • LaurensM Profile Picture
    12,510 Super User 2025 Season 1 on at
    Re: How to get number up and down

    @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!

  • dylandavis09 Profile Picture
    438 on at
    Re: How to get number up and down

    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! 🙂

  • dylandavis09 Profile Picture
    438 on at
    Re: How to get number up and down

    Hi @SpongYe !

     

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

  • Verified answer
    SpongYe Profile Picture
    5,580 Super User 2025 Season 1 on at
    Re: How to get number up and down

    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! 🍻

  • LaurensM Profile Picture
    12,510 Super User 2025 Season 1 on at
    Re: How to get number up and down

    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!

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,601 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,946 Most Valuable Professional

Leaderboard