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 / Show button or screen ...
Power Apps
Answered

Show button or screen based on Email

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello!

I am new to PowerApps and I am programming an application. How do I make a screen visible for just 2 emails? And how can I make certain things like buttons visible for admins only?


Categories:
  • v-siky-msft Profile Picture
    Microsoft Employee on at

    @Anonymous 

    Do you mean the screen is only visible for two users(Emails)?

    You need to set the Visible property of Screen, add an if condition to check if the login user is that two users(Emails) you want.

    If(User().Email = user1@abc.com || User().Email = user2@abc.com, true, false)

    The same thing with button, add an if condition to Button Visible property.

    If(User().Email = admin1@abc.com || User().Email = admin2@abc.com, true, false)

    Sik

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Appreciate it! Will test it as soon as I can and I will let you know. I indeed meant to show the screen only to 2 emails like you explained.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello!

    @v-siky-msft 

     

    This does not work. I get an error tryin to do this. Is this because I guess it is because I have not set "user" yet? How do I do that?

  • eka24 Profile Picture
    20,925 on at
    Kindly watch the video from Mr Dang
    https://youtu.be/xtG83BOiTsg
    Also https://powerusers.microsoft.com/t5/Building-Power-Apps/Display-Field-Based-on-User/m-p/75306

    If you like this post, give a thumbs up. Where it solved your issue, Mark as a solution

  • v-siky-msft Profile Picture
    Microsoft Employee on at

    @Anonymous 

     

    The User function returns a record of information about the current user, reference: User function  

    Property Description
    User().EmailEmail address of the current user.
    User().FullNameFull name of the current user, including first and last names.
    User().ImageImage of the current user. This will be an image URL of the form "blob:identifier". Set the Image property of the Image control to this value to display the image in the app.

     

    Could you share more about your test and the App?

    Sik

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Of course! 

     

    I am programming an application for the company where I do my internship and basically there will 2 type of users, admins and normal users. Now I want there to be an "Admin" button only visible for 2 email adresses. When an admin clicks on the button, another screen will be visible for them (Could maybe do this automatic by just checking the mail as it runs?, I don't know). 

    So basically I made a button and did you stated above. I clicked on the button and selected "Visible" and then I typed the following: 

    If(User().Email = firstemail@hotmail.com || User().Email = secondemail@hotmail.com, true, false) 

    Whenever I try to do this, it does not work and will give me an error.

    @v-siky-msft 

  • v-siky-msft Profile Picture
    Microsoft Employee on at

    @Anonymous 

    Sorry for my bad, Emails needs to be enclosed in double quotation marks.

    Try this:

    If(User().Email = "firstemail@hotmail.com" || User().Email = "secondemail@hotmail.com", true, false) 

    Sik

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    No problem at all, the "email" fixed quite a lot but it still does not work. I uploaded a picture so you can see what's up.

    @v-siky-msft 

    excel3.JPG
  • Verified answer
    v-siky-msft Profile Picture
    Microsoft Employee on at

    @Anonymous 

    It needs to use ";" as a separator, it depends on your language. Reference: https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/global-apps#formula-separators-and-chaining-operator 

     

    If(User().Email = "firstemail@hotmail.com" || User().Email = "secondemail@hotmail.com"; true; false) 

    Sik

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you so much! That fixed it 🙂

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 236 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 169

Last 30 days Overall leaderboard