cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
thunter
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.

image1.jpg

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!

 

2 REPLIES 2
KroonOfficeSol
Level 10

Re: Filter results by Groups

@thunter

 

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.

 

Paul

thunter
Level 8

Re: Filter results by Groups

@KroonOfficeSol

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.

collection.jpg

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

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

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

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