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 / Problem using the OnSt...
Power Apps
Answered

Problem using the OnStart() property

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello,


i've got a problem with the OnStart() property which i wasn't able to figure out yet.

The situation is that i have a powerapp which should be able to navigate between screens on start if the user in in a SP list which contains the e-mail adresses of all administrators

The Code im using looks like this:

If(IsBlank(LookUp(Administrators;User().EMail in admin;admin)) = true;Navigate(ScreenUsers;Fade);Navigate(ScreenAdministrators;Fade))

 

I've also tried several other function who don't work.
It looks like that the user() function can't load the user before the OnStart() property triggers so the value of the user() is always blank even if the administrator list contains the current user.

 

Categories:
I have the same question (0)
  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

    Could you please share a bit more about your SP list?

    Do you use the admin column to store the email address within your SP list?

    I have made a test on my side, and don't have the issue that you mentioned. The screenshot as below:10.JPG

    Set the OnStart property of the first screen of my app to following:

    If(
    IsBlank(LookUp('20181022_case12_Administrators',User().Email in Admin)),
    Navigate(ScreenUsers,ScreenTransition.Fade),
    Navigate(ScreenAdministrators,ScreenTransition.Cover)
    )

    On your side, please modify your formula as below:

    If(
    IsBlank(LookUp(Administrators;User().Email in admin));
    Navigate(ScreenUsers;Fade);
    Navigate(ScreenAdministrators;Fade)
    )

    then check if the issue is solved.

    In addition, you could also consider take a try to type above formula within the OnVisible property of the first screen of your app instead of OnStart property, then check if the issue still exists.

    If the issue still exists, please take a try to turn off/disable the "Delayed load" option within Advanced settings of App settings, then check if the issue is solved.

     

    Best regards,

    Kris

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello Kris
    That really helped me.

     

    another Method i found is to to do this on the OnStart() property

    UpdateContext({CurrentUser:User().Email});;
    if(

       IsBlank(Lookup(Administrators;CurrentUser in admin);

       Navigate(ScreenUsers;Fade);
       Navigate(ScreenAdministrators;Fade)

       )

    )

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 536

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard