cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
remariu
Helper I
Helper I

How to set Global variables without OnStart

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

1 ACCEPTED SOLUTION

Accepted Solutions
timl
Super User
Super User

@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/

 

View solution in original post

2 REPLIES 2
Drrickryp
Super User
Super User

timl
Super User
Super User

@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/

 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,547)