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 / Variant set, increment...
Power Apps
Answered

Variant set, increment button but it doesn't reset to value 0

(0) ShareShare
ReportReport
Posted on by 20

Hi all,

 

I am trying to create an app where I need the default value to be 0 and have a button to increment the value every time it's selected, but once the form is reset, it should return to value 0.

I have managed to add the increment formula with a variant, but the default is not 0 anymore and when I reset the form the initial box does not reset. What do I need to do?

Here is my app and formula used.

auracarp_0-1692617855625.png

In the box I have the following formulas

On select  Set( var1, 0 )

Default  var1

Reset false (I tried changing this formula to true but it did nothing)

 

On the plus button I have this formula

On select  Set( var1, var1 + 1)

Categories:
I have the same question (0)
  • RJM07 Profile Picture
    801 on at

    When you reset the form, do Set(var1,0)

  • auracarp Profile Picture
    20 on at

    I tried that, but comes up with an error.

     

  • RJM07 Profile Picture
    801 on at

    What error message did you receive?

  • auracarp Profile Picture
    20 on at

    This one

    auracarp_0-1692620765266.png

     

  • Verified answer
    RJM07 Profile Picture
    801 on at

    Oh right, so you have a button that you press to save the form, right?

    so on the OnSelect of that button, after all of your code put 

    Set(var1,0);

  • auracarp Profile Picture
    20 on at

    Amazing, it worked. Thank you so much 🙂

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 416 Most Valuable Professional

#2
11manish Profile Picture

11manish 205 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard