cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mrizz
Frequent Visitor

Cascading Filter

I have an employee directory and the two columns I care about are Name, and ManagerName. I want to filter a gallery, to show the Employees from the Name column whose ManagerName = User().FullName, and if any of those resulting employees are in the manager column, also show the employees whose manager = that Name. For Example, lets say the following is my collection:

 

Name:                   ManagerName: 

Name One            CEO Test

Name Two            Name One

Name Three          Name Two

 

and the User().FullName = "Name One"

Then I want the filtered gallery to display both Name Two and Name Three, because Name One is Name Two's Manager, and Name Two is Name Three's Manager. 

Thanks.

 

1 REPLY 1
Sid_Jafri
Responsive Resident
Responsive Resident

First you need to store the managers into variable e.g.
UpdateContext({varManager1: OfficeUsers.ManagerV2(User().Email)});
UpdateContext({varManager2: OfficeUsers.ManagerV2(varManager1.userprincipalName)});
UpdateContext({varManager3: OfficeUsers.ManagerV2(varManager2.userprincipalName)});

Then apply the filter on your gallery
Filter(Source, Name = varManager2.displayName || Name = varManager3.displayName)

Please Thumbs up if my post helped you solve your issue.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,713)