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 / Check value in Sharepo...
Power Apps
Answered

Check value in SharepointList on StartScreen without List permitions

(0) ShareShare
ReportReport
Posted on by 60

Hi,

 

At the start of the App I need to redirect the users to one of two screens depending on a query to a Sharepoint List. I'm doing it in the App.OnStartScreen.

 

With(
{
wActions:
Filter(Users;Mail = User().Email)
};
If(CountRows(wActions) > 0;Travels;RegisterUser)

)

 

This works well. But if the user doesn't have permitions to the Sharepoint List 'Users' it will go to the Travels screen and give some errors.

 

What I want to do is verify if the user has permitions and if not Notify him and them Exit().

 

Thanks

Categories:
  • WarrenBelz Profile Picture
    156,748 Most Valuable Professional on at

    Hi @Reze ,

    With the code below, create an exit screen, with only one button and the message you want and OnSelect

    Exit()

    then your code (I cannot test this but it should work)

    With(
     {
     wActions:
     Filter(
     Users;
     Mail = User().Email
     )
     };
     IfError(wActions);
     YourExitScreen;
     If(
     CountRows(wActions) > 0;
     Travels;
     RegisterUser
     )
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

     

  • Reze Profile Picture
    60 on at

    Hi Warren,

     

    It works but the Red notifications continue to show. Anyway to remove/hide them?

     

    Thank you for your help.

     

    I will accept your answer.

    Screenshot_20220606-091338_Power_Apps[1].jpg
  • Reze Profile Picture
    60 on at

    Hi Warren,

     

    I reply to soon. It works when I haven't permitions for the List but it always goes to the Exit screen even if I have permitions to the List.

     

    I'm forgetting something?

  • WarrenBelz Profile Picture
    156,748 Most Valuable Professional on at

    Hi @Reze ,

    StartScreen (which is new) is probably not the best place to be doing this. As you can see yourself from the logic, it should work. I have to ask the question why you are sharing the app with users that do not have permissions on all the connected lists. 

  • Verified answer
    Reze Profile Picture
    60 on at

    Hi Warren,

     

    I'm doing this in the OnStart. I switch on the OnStart in the configurations. The logic seems good but it runs booth the expressions but only goes to the Exit Screen. I tryied to put a Notify in the case of no error and the CountRows but (with permitions to the List )it goes to the Exit screen and it shows the message from notify, so both sentences are executed in the IfError statement.

     

    The App was working with the StartScreen code but then I shared the App with people that didn't have permitions for the lists and this error shows. I think it's better to handle it.

     

    Thank you

  • Verified answer
    WarrenBelz Profile Picture
    156,748 Most Valuable Professional on at

    Hi @Reze ,

    You can try this way, but is would be far easier to simply share the lists with all the users the app is shared with

    IfError(
     Filter(
     Users;
     Mail = User().Email
     );
     Navigate(YourExitScreen);
     If(
     CountRows(
     Filter(
     Users;
     Mail = User().Email
     )
     ) > 0;
     Navigate(Travels);
     Navigate(RegisterUser)
     )
    )

    I must admit I have never needed to trap an intentional error.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

     

  • Reze Profile Picture
    60 on at

    Hi @WarrenBelz,

     

    It's working perfectly.

     

    I'm new to PowerApps obviously. I'm testing this App and when it goes to production I will need to Add permitions to over 100 persons. I don't even know if it's possible to give permitions to all of them at once or if I need to give permitions one at a time. I supposed there's a way to add permitions to a group of persons.

     

    Thank you for the help.

  • WarrenBelz Profile Picture
    156,748 Most Valuable Professional on at

    Hi @Reze ,

    I use Security-enabled Groups, that way Admin people can control the permissions (it does not need any ownership of the Power App or SharePoint List)

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 312

#3
Mohsin Ali Profile Picture

Mohsin Ali 252

Last 30 days Overall leaderboard