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 reset global va...
Power Apps
Unanswered

How to reset global variables on playing canvas app during development?

(0) ShareShare
ReportReport
Posted on by 12

I was expecting all global variables to be reset to initial values on playing the canvas app during development, but it is not working like this.

Categories:
I have the same question (0)
  • developerAJ Profile Picture
    4,643 on at

    it depends on where you define them.

     

    APP.onstart than it will reset to defined values.

     

    than screen onvisible if u set another value than it will overwrite. please check

     

  • Mahmood Muzaffar Profile Picture
    12 on at

    To reset global variables to initial values during development, there is another option in the app three dots (...), click run onStart. It will reset all global variables. Now you play the app, it will have all global variables from initial values.

    MuzaffarMuhmood_0-1690049026252.png

     

  • timl Profile Picture
    36,383 Super User 2025 Season 2 on at

    @MuzaffarMuhmood 

    Running OnStart will not reset all global variables to their initial values. It will only reset variables that are defined in the OnStart property of the app.  For example, variables that you 'Set' on a screen only, will not be reset by running OnStart.

    There is no way to reset all global variables to their initial values. The quickest way would be to save your app and to reload the designer by refreshing the browser by clicking F5. If you now play your app, all variables will be reset.

  • Mahmood Muzaffar Profile Picture
    12 on at

    @timl 

    Yes, you are right. Refresh window is very time taking there should be some better solution for this problem.

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