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 / 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:
I have the same question (0)
  • 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

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 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard