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 / Can you lock a screen ...
Power Apps
Answered

Can you lock a screen based on a people column in sharepoint?

(0) ShareShare
ReportReport
Posted on by

Hi All,

 

Might be a strange question, but I have a training app that allows users to scroll through various company training events and register.

 

I have created a second screen for the event leaders to access in order to manage attendances, etc. 

 

I want to lock this second screen so that only approved event leaders can access. The question is, I want to create this app so that it is easily maintained by people that don't have to look at permissions or have a background in technology (I also want to hand this off and not be responsible for maintenance).

 

With that, is there a way to potentially add a sharepoint list with a set of names that I can the have the app search and and if that user is logged into the app, allow access to the second screen?

(the site is locked down to an admin person, and while they are okay with SharePoint permissions, they won't want to touch the app).

 

If so, how would I go about this from a formula perspective?

 

Many thanks in advance,

 

DW

Categories:
  • Verified answer
    Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @DGWolfe ,

     

    It is a very common requirement.

     

    Suppose for example you have a Button control and on the selection of that Button, the user is navigated to the second screen. However, you want that Button to be visible only if the logged in user exists in your "Admin List".

     

    To achieve that, apply the below the Visible property of your Button:

     

    !IsBlank(
     LookUp(
     'Your Admin List',
     'Your People Field'.Email = User().Email
     )
    )

     

    ------------------------------------------------------------------------------------------------------------------------------

     

    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

    Imran-Ami Khan

     

  • SpongYe Profile Picture
    5,909 Super User 2026 Season 2 on at

    Hi @DGWolfe 

     

    You can hide or disable the button if the User().Email is not in the Sharepoint List. 

     

    Button.Visible

     

    If(CountRows(Search( <SharePointList>, User().Email, <FieldName>))>0, true, false)

     

     

    Button.DisplayMode

     

    If(CountRows(Search( <SharePointList>, User().Email, <FieldName>))>0, DisplayMode.Edit, DisplayMode.Disabled)

     

     

    ------------------------------------------------------------------------------------------------------------------------------
    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

  • Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @SpongYe @DGWolfe careful with in, it is not a delegable function with SharePoint.

     

    ------------------------------------------------------------------------------------------------------------------------------

     

    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

    Imran-Ami Khan

  • SpongYe Profile Picture
    5,909 Super User 2026 Season 2 on at

    @Amik 

     

    I can agree with that. I changed it to the function Search().

    It's a more reliable. Thanks for the headsup 🙂 

     

  • Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @SpongYe careful with Search and CountRows as well, neither are delegable functions with SharePoint.

     

    Amik_0-1693528079900.png

     

    https://learn.microsoft.com/en-us/connectors/sharepointonline/#power-apps-delegable-functions-and-operations-for-sharepoint

     

    Also, regarding the below:

     

    If(CountRows(Search( <SharePointList>, User().Email, <FieldName>))>0, true, false)

     

     

    There is no need to run an IF function on a property which will only accept a Boolean anyway. You can shorten it down to:

     

    CountRows(Search( <SharePointList>, User().Email, <FieldName>))>0

     

     

    ------------------------------------------------------------------------------------------------------------------------------

     

    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

    Imran-Ami Khan

     

  • DGWolfe Profile Picture
    on at

    Perfect! Thank you so much! 

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard