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 / OnStart deprecation - ...
Power Apps
Unanswered

OnStart deprecation - where do I place global variables/collections

(0) ShareShare
ReportReport
Posted on by 523

1) Am I correct in understanding that OnStart will itself be deprecated, not just the Navigate() function within OnStart?

 

2) When initializing variables/collections, are named formulas meant to be a replacement for using OnStart for these?

 

3) Does anyone know if there will be a global location one can execute a formula a single time (instead of on-demand like named formulas).

Categories:
I have the same question (0)
  • Verified answer
    DavidZoon Profile Picture
    738 Most Valuable Professional on at

    Hello @Medoomi ,

     

    1)  OnStart will not be deprecated, just the Navigate() function within

     

    2) Named formulas will not replace global variables, they will be complementary. Depending on the need, it will be more appropriate to use one or the other type.
    Example 1: store data that is always updated: very simple with named formulas, where you had to go through a timer to regularly update the global variable
    Example 2: having a global value whose value must be changed according to events, it will be necessary to prefer the global variable because we cannot change the formula of a named formula or do a set().

  • kevinhowells Profile Picture
    4 on at

    I stopped using onStart and instead use a custom component to house all my variables.

    For example:

    > Create a custom Component: "_variables",

    > Allow that component to access the Apps scope,

    > Add a custom -input type- property to _variables.

    > make this a Boolean object 

    > name this input whatever you want your variable to be called.

    > Give this variable a default value: Blank()

    > Be sure to select the OnReset checkbox

     

    you can now add this component to each screen and use the OnVisible and OnHidden properties of each screen to adjust your variables as needed.

     

    > you can go a step further and add Screen Inputs/Outputs to the _variables custom properties.

    this then allows you to create a "Variables" Screen that contains a sort of "Global" variable table.

    It is here, on the Variables Screen that you can do some real magic with "global" references

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