web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Lock Gallery to only U...
Power Apps
Unanswered

Lock Gallery to only User Data

(0) ShareShare
ReportReport
Posted on by 154
I have been away from using PowerApps for quite a while and trying to recall certain tasks.
 
I have a simple app that has an entry screen and a view/edit screen with a Gallery and Form.  Currently everyone can see what is in the Gallery.  I want to limit this to only their items.  Second, I want managers to be able to see everything from only their employees, then Senior management to see everything.
 
There is no specific datasource with this information, but AAD has the names and responsibilities of each employee, sync with our local AD.
 
Suggestions?
Categories:
I have the same question (0)
  • MiDer Profile Picture
    139 on at
    Lock Gallery to only User Data
    Hi

    Would give it a shot by checking two things upfront:

    1) is the user member of a certain group? - If it`s the case it`s senior management
    2) does the user have any direct reports linked?
    Office365Users.DirectReports(User().EntraObjectId)
    If yes you have a manager in front of you.

    With the above result as variable, a switch statement for the gallery items filter.
    Either show only records with a matching user, show records where the user is included in the list of direct reports or show all records.
    Just to be on the save side, I would set the default of the switch to null. 

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 757 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 322 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 209 Super User 2025 Season 2

Last 30 days Overall leaderboard