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 / Incrementing Variable
Power Apps
Answered

Incrementing Variable

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi

I'm trying to do a simple thing which is:

I've a variable called "VarSelectedTab".

I want to have a button where when I click on it, it will increment the value by 1.

So, this is what I did.

Add Button

OnSelect: VarSelectedTab = VarSelectedTab + 1

 

yjamous_1-1623340727524.png

 

TextInput:

Default: VarSelectedTab

yjamous_2-1623340758014.png

 

When I click on the button, the VarSelectedTab doesn't change. It remains at 1.

 

yjamous_0-1623340697561.png

Thanks in advance

 

Categories:
I have the same question (0)
  • Verified answer
    CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @Anonymous In the OnSelect, the formula should be,

    Set(VarSelectedTab, VarSelectedTab + 1)

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 762

#2
11manish Profile Picture

11manish 640

#3
Valantis Profile Picture

Valantis 548

Last 30 days Overall leaderboard