Variables in App OnStart stopped working

  • Variables in App OnStart stopped working

    Posted by lisa-white on May 12, 2022 at 2:51 pm
    • Lisa White

      Member

      May 12, 2022 at 2:51 PM

      I’ve been setting global variables (see examples below) in App OnStart for years. Yesterday (5/11/22), the variables stopped working in a new Power App that I’m developing. The variables still work in currently deployed apps – I’m afraid to edit any of them for fear the variables will break.

      I’ve saved and published the app multiple times, closed and restarted Power Apps multiple times, rebooted, tried running vs. editing the Power App, and beseeched the Technology Gods to help me.

      Is anyone else experiencing this issue?

      Sample variables on App OnStart:

      Set(
      varAppVersion,
      “V0.001.00 4/18/2022”
      );

      Set(
      varCurrentUser,
      User()
      );

      Set(
      varManager,
      Office365Users.Manager(User().Email).Mail);

      Set(
      varDepartment,
      Office365Users.UserProfileV2(User().Email).department;

      ——————————
      Lisa White
      Senior IT Specialist
      Herndon VA
      703-709-7172
      ——————————

    • Ed Bellman

      Member

      May 13, 2022 at 8:16 AM

      Can you confirm that File > Settings > General > Enable App.OnStart property is turned On?

      I know they blocked Navigate() in OnStart but everything else should still be okay.

      Thanks, Ed

      ——————————
      Ed Bellman
      Principal Consultant
      P3 Adaptive
      Fairborn, OH
      ed.bellman@outlook.com
      ——————————
      ——————————————-

    • Lisa White

      Member

      May 16, 2022 at 3:02 PM

      Hi Ed,

      Yes, Enable App.OnStart is turned on. And, even more mysteriously, it started working the next day. I’m guessing someone fed the hamster.

      I’m looking at the “declarative” method to set variables in the App.StartScreen. Planning to test them on a sandbox Power App.

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

      Thanks for your help.

      ——————————
      Lisa White
      Senior IT Specialist
      Herndon VA
      703-709-7172
      ——————————
      ——————————————-

    lisa-white replied 3 years, 3 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

The discussion ‘Variables in App OnStart stopped working’ is closed to new replies.

Start of Discussion
0 of 0 replies June 2018
Now

Welcome to our new site!

Here you will find a wealth of information created for peopleĀ  that are on a mission to redefine business models with cloud techinologies, AI, automation, low code / no code applications, data, security & more to compete in the Acceleration Economy!