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 / How to set Global vari...
Power Apps
Answered

How to set Global variables without OnStart

(0) ShareShare
ReportReport
Posted on by 173

I'm trying to find information on how to use the new version of PowerApps without the OnStart parameters.  I use OnStart quite frequently to set a whole host of global variables when the app launches, but can't seem to find where these should be saved now.  In addition, I there is no option to select "Run on Start" while in developer mode to trigger the setting of these variables.  Any suggestions on where to find information on this new "feature" or how to set Global Variables now on start of the app?

 

Thanks,

Renee

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @remariu 

    OnStart is deprecated in favor of StartScreen. See for details.

    https://powerapps.microsoft.com/en-us/blog/app-startscreen-a-new-declarative-alternative-to-navigate-in-app-onstart/

  • Verified answer
    timl Profile Picture
    37,160 Super User 2026 Season 1 on at

    @remariu 

    Moving forwards, the replacement of setting global variables in OnStart is to use Named Formulas instead (which is currently an experimental feature). To summarise the content of the help link below, instead of this...

    Set( BoardSize, 70);
    Set( BoardLight, RGBA(240,217,181, 1) );
    Set( BoardDark, RGBA(181,136,99, 1) );
    Set( BoardSelect, RGBA(34,177,76,1) );

    You would now do this in App.Formulas

    BoardSize = 70;
    BoardLight = RGBA(240,217,181, 1); 
    BoardDark = RGBA(181,136,99, 1); 
    BoardSelect = RGBA(34,177,76,1); 

     

    https://powerapps.microsoft.com/en-us/blog/power-fx-introducing-named-formulas/

     

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

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 842

#2
Valantis Profile Picture

Valantis 563

#3
Haque Profile Picture

Haque 402

Last 30 days Overall leaderboard