Showing results for 
Search instead for 
Did you mean: 
Level 8

Filter results by Groups

My app has 3 screens:

  1. HomeScreen
  2. UpdateIncidentScreen 
  3. ViewIncidentScreen 

On my HomeScreen, OnVisible I have a Collection that specifies which Report Group the logged in user is in.


My goal is that the logged in user only sees records that are in their Report Group. I have column in my SQL table called rpt_group. 


Is there an easy way to do this by pulling a Collection? Or is there a better method? Thank you in advance!


Level 10

Re: Filter results by Groups



First the rpt_group should be connected to the user in one way or the other, is this the case?


If not, I would collect the Office365 info off the user and store this in a new users table in your database. Then let the User select his rpt_group when he uses the app for the first time and store this GroupId also in this Users table. Then the next time you run a script at start in where you lookUp the user in this table and return the result in a local variable with UpdateContext() formula. Lets say this variable is called _PUser then you can filter the report with

rpt_group = _PUser.rptGroup

I would use Flow and a stored procedure to do this, but lookup will also work.


Hope this helps.



Level 8

Re: Filter results by Groups


Hi Paul,


Thanks for your feedback. Yes, I do pull all the users emails and report group into a Collection when the App opens up.


Helpful resources


Watch Sessions On Demand!

Continue your learning in our online communities.

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!

Users Online
Currently online: 128 members 5,338 guests
Please welcome our newest community members: