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 Apps - Building Power Apps
Unanswered

Lock Gallery to only User Data

(0) ShareShare
ReportReport
Posted on by 150
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?
I have the same question (0)
  • MiDer Profile Picture
    137 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 714 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 419 Super User 2025 Season 2

#3
developerAJ Profile Picture

developerAJ 243

Last 30 days Overall leaderboard