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 / App.OnStart not executing
Power Apps
Answered

App.OnStart not executing

(0) ShareShare
ReportReport
Posted on by 54

Hi,

 

One of my Power Apps that I created last year (and continue to update) all of a sudden won't execute any of the code written in the App.OnStart.  I know there was a recent change with App.StartScreen and other impending declarative changes to Power Apps.   The only screen mentions in my App.OnStart is in a collection for app navigation built through a component, but the navigate function is not used:

 

collectionNavPowerAppsComp.png 

 

The announcement for moving to a declarative App.OnStart was only a couple months ago so I did not expect all App.Onstart code would need to be changed so quickly.  Does it? Or Is there some other issue happening with App.OnStart?

 

I've checked my other apps which are far less complex than this one with only collections being created in the App.OnStart and have not seen any issues.  I also declare variables in this App.OnStart:

 

varaiblesOnStartPowerApps.png

 

I saw in this Microsoft article a new way to set/declare variable so I updated one (shown above), but it's still not working. 

 

Any help would be greatly appreciated,

Cheryl

Categories:
  • Verified answer
    CCava Profile Picture
    54 on at

    This issue has been solved and was a much simpler problem: at the very bottom of App.OnStart, I had a Clear(CollectionName) for a collection I no longer had.  Once I removed that line, everything worked.  

  • GermanPearls Profile Picture
    3 on at

    Thanks for the tip @CCava that there's probably an error in the OnStart code.

     

    In case this helps anyone, click in the OnStart code and scroll through all, if you're lucky PowerApps will highlight any errors with the red squiggly underline.

  • kat_rock Profile Picture
    114 on at

    I had a similar issue. My App.onStart function would not run because I had an extra /* left. Once I removed that it worked again without issue.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard