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 / Two types of visualiza...
Power Apps
Unanswered

Two types of visualization on PowerApps

(0) ShareShare
ReportReport
Posted on by 15

I started developing an app at the company I work for that displays the results of all employees based on some formulas and indicators. By selecting an employee's name, you can view their scores for each indicator, as well as their overall score. However, I have a question because I need to have two views in the app: one for supervisors/leadership, who can see the results of all employees from all teams, and one for team members, who can only see their own results.

 

I thought about creating a database with all users who have the "Admin" role, which will be for supervisors/leadership since changes to this database won't be very frequent. If a user is not in this database, they can only see their own results.

 

In this case, what would be a formula that makes sense for this structure? Or is there another way to achieve this?

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

    @gabriel_broco - the answer depends on your data source. If you're using Dataverse for example you could set up custom security roles which display specific information or Views based on the logged in user.

     

    If on the other hand you're using SharePoint, you certainly create a separate SharePoint list populated with your "Admin" users. You can leverage the LookUp function to identify if the current logged in user exists in that table.

     

    For example you could apply the below to the OnStart property of your App:

     

    Set(
     gbl_IsAdmin,
     !IsBlank(
     LookUp(
     'Sample List',
     'Single Choice People Field'.Email = User().Email
     )
     )
    )
    

     

    Or apply the below to the OnVisible property of specific screens:

     

    UpdateContext(
     {
     ctx_lIsAdmin: !IsBlank(
     LookUp(
     'Sample List',
     'Single Choice People Field'.Email = User().Email
     )
     )
     }
    )
    

     

    Note if you are using SharePoint, ALL users will still read/write access to your all SharePoint lists.

  • gabriel_broco Profile Picture
    15 on at

    Hello Amik, this response really helped!

     

    On that same note, I'm using the login, that translates as "MailNickname" (Office365Users.UserProfile(InfoAbout.Text).MailNickname)) for the users that have this Admin Acess, on a excel/sharepoint collumn. How can I Connect it as a Admin on this gbl_isAdmin? 

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

    @gabriel_broco same principle:

     

    Set(
     gbl_IsAdmin,
     !IsBlank(
     LookUp(
     'Sample List',
     'Person Text' = Office365Users.UserProfile(User().Email).MailNickname
     )
     )
    )
    

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

#2
WarrenBelz Profile Picture

WarrenBelz 189 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 126

Last 30 days Overall leaderboard