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

Problem using the OnStart() property

(0) ShareShare
ReportReport
Posted on by

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
    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
    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

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard