Showing results for 
Search instead for 
Did you mean: 
Level: Powered On

Re: Filtering Gallery by Drop Down

Ok cool. Ill try this out thanks.

My point is with filtering it allows senior management to filter down to a specific team or vp or director if they so chose. 

With over a thousand people under one EVP. 400 under a SVP including 6 Directors and 32 managers with direct reports. There needs to be a drill down available that allows Upper manager to see that information. So it would be usless for a EVP to see her entire organization that includes 3 seperate departments. 

Is that what your trying to understand?
Level 10

Re: Filtering Gallery by Drop Down

Oh, I totally understand the need for filtering the number of records returned... I'm just saying that I don't see the need to handle it at the Items property of the Gallery. If you wait until that point to filter your records, you have collected EVERYONE into the DirectReports collection... With 4000 employees under 1 EVP, and how-ever-many EVPs, that's a HUGE number.


I don't know the specifics of the use-cases you are trying to satisfy, but if I were to tackle a generic version of your problem I would ClearCollect() at the point that the manager was selected. That would create a DirectReports collection of ONLY the employees reporting to that Manager, and wouldn't need a Filter.


The caveat to that would be if you want to show ALL the reps under an administrator regardless of filtering it to the Manager (the lowest) level. For example, VP Person1 has 5 Directors, who each have 3 Managers as direct reports, and each of them have 4 Reps. Would you want to pick the VP and show 60 entries? And then, if you picked one of the Directors, you would show 12 entries? And if you picked one of the Managers, you would show 4 entries?


Again, me solving a strawman version of your problem, I would have a Combobox for each level of management (EVP, VP, Director, and Manager). Each would have an Item property pulling from the heirarchy level just above it. Each would, OnChange, Reset() the comboboxes for the heirarchy below them (in effect, blanking them), and then they would rebuild a Collection I would call Reps. The build would have to be smart enough to know how many levels down it needed to drill down until it got to the Rep level (i.e., a Manager would drill one level, a Director would drill two levels, etc.). Then I would have my Gallery set to the Reps collection (no filter required).


Next, I would craft a visual indication of what level we were representing on the form (imagine a color block bounding whatever combobox had established the level of our view - EVP, VP, Director, or Manager. Each combobox, in the OnChange event, would make that bounding box visible and all the others invisible.


Last, I would add a button beside each of the heirarchy comboboxes that would do everything I just mentioned going on in the OnChange event of the combobox EXCEPT for the Reset of the downstream comboboxes. This button would represent us resetting our dashboard view to a particular level without having to make a change to the combobox. For example, you drill from EVP to VP to Director to Manager. You are showing a handful of Reps. You want to back-out to the VP level, so you click on the VP button and the bounding box highlights that combobox as the level being viewed in the dashboard gallery, but leaves the items selected for Director and Manager still selected, should you wish to return to them (by clicking the buttons associated with each).


Make sense? I know sometimes reading about other people's projects can be a little down-in-the-weeds... and this is even worse... this is my down-in-the-weeds about your down-in-the-weeds. Man LOL

Level: Powered On

Re: Filtering Gallery by Drop Down

Yes! this makes total sense and I like it! Thank you for that explaination! 


Im going to try this out!


Re: Filtering Gallery by Drop Down

Thank you for your help with this thread @TimRohr!


@cma2438 have you been able to test out the new approach?



Helpful resources


Watch Sessions On Demand!

Continue your learning in our online communities.


PowerApps Monthly Community Call

Next Wednesday, August 21st at 8am PDT

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020


Power Platform World Tour

Coming to a city near you


PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!


Join PowerApps User Group!!

Connect, share, and learn with your peers year-round


Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!


Power Summit Australia 2019

August 20-23rd 2019

Users Online
Currently online: 4 members 4,269 guests
Please welcome our newest community members: