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 / email id based screen ...
Power Apps
Answered

email id based screen access

(1) ShareShare
ReportReport
Posted on by 255
In power apps i have a screen named "Assign tracker" this screen should access for only users table name called user_accesses in dataverse, i didnt get any error in code, 
but i removed my mail and other person id and check its opening or the button should hide for other users expect id's given in that table. how can i perform this...
 
 
in App on onstart - "
Set(varUserAccess,LookUp(User_Accesses,E_mail=Office365Users.MyProfile().Mail))"
 
 
on button in visible 
Categories:
I have the same question (0)
  • Suggested answer
    Pstork1 Profile Picture
    68,707 Most Valuable Professional on at
    The code you are using in App Onstart is probably retrieving your email address, not the user's .  Change the code to the following
     
    Set(varUserAccess,If(Coalesce(LookUp(User_Accesses,E_mail=User().Mail).Mail,"N/A")="N/A",false,true))
     
    Lookup will find the record that matches the email.  Then Coalesce will either return that email or "N/A" if its not found. You can use that in an IF to set the boolean variable.

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     
  • Jawaharprem Profile Picture
    255 on at
    Hi, 
    Thanks for your time.
    if updated the below code in app on start "
    Set(varUserAccess,If(Coalesce(LookUp(User_Accesses,E_mail=User().Email).E_mail,"NA")="NA",true,false))" no errors
     
    and in button on "Visible" "
    If(!IsBlank(varUserAccess),true,false)" 
     
    button not visible for me, i getting as below.
     
     
    Table - i added my id starts with "prem" but the button is not visible.
     
  • Verified answer
    Jawaharprem Profile Picture
    255 on at
    Hi, this works
     
    On App onStart - 
    ClearCollect(Alloweduser,User_Accesses);
    Set(userAccess,!IsBlank(LookUp(Alloweduser,Lower(E_mail)=Lower(User().Email))))
     
    and in Button Visible - "userAccess"

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