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 / Global Variable Issues
Power Apps
Unanswered

Global Variable Issues

(0) ShareShare
ReportReport
Posted on by 5

I have an app with some items I want to hide using a debug variable called varDebug (a boolean).  I've read the other topics on this but none of the suggestions helped. 

 

In the app>onstart property I have the following Set(varDebug,true);  In a label field when I check varDebug it's false.  What?!

 

All the other global variables I set for formatting also stopped working too.  I've changed the authoring version several times and nothing changes.  All my globals are not working now and I fail to understand why.

 

All the following formatting variables located in app>onstart also stopped working.  The worked at one time and just stopped: 

Set(MyBorderThickness,1);
Set(MyFill, RGBA(230, 230, 230,1));
Set(MyCheckBoxHt,425);
Set(MyDarkBorder,RGBA(0,0,0,1));
Set(ResetAllCheckBoxes,false);
Set(MyFrmWidth,1083); 
Set(MyFrmPadding,20); 
Set(MyWidth,(MyFrmWidth/2-MyFrmPadding));

Categories:
  • LaurensM Profile Picture
    12,516 Moderator on at

    Hi @seegerp2000,

     

    Within the editor make sure you run the OnStart by selecting the three dots and clicking on 'Run Onstart'. After each code change within the OnStart property, you will have to rerun the code:

     

    LaurensM_0-1680621512505.png

     

    What might also be beneficial is double checking your OnStart property for any errors, either by going over the code manually or using the App Checker. A small error (forgetting a bracket or semicolon) can cause the OnStart to fail. As a note, for production applications I would also generally advise sticking with the recommended authoring version.

     

    Should the steps above not work, you could try and troubleshoot the issue by removing your OnStart code and trying to add it step-by-step - with each step rerunning the OnStart and seeing the effect.

     

    If this solves your question, would you be so kind as to accept it as a solution.

    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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 236 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 169

Last 30 days Overall leaderboard