cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Permissions for multiple, specific users to view a record

Hi,

 

I've built an issue tracker based on a SharePoint list that enables me to create an issue and assign it to an individual.  Thise individuals must only be able to view issues that have been assigned to them.

 

When using SharePoint alone I achieved this by modifying the 'view' to show only tasks with [ME] in the 'EmailOwner' column. Within PowerApps, I've gotten it to work by adding an email address to the 'EmailOwner' column and using the following filter:

 

Filter('Issue Tracker', EmailOwner = User().Email)

 

This works fine if there is only one owner, however an issue may be assigned to more than one individual. The above filter doesn't seem to work if I put more than one email address in the 'EmailOwner' column in SharePoint.

 

I'd be incredibly grateful for any info on either:

 

a) if there is a way to have the filter recognise one of multiple email addresses, or;

b) whether there is a better way of doing this  

 

Many thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Champion
Community Champion

Re: Permissions for multiple, specific users to view a record

Hi @Chappy024 ,

In smaller datasets, you could use the In function

Filter('Issue Tracker', User().Email in EmailOwner)

so if the user's email was anywhere in the field, it would find it. I would also use (from hard experience)
Filter('Issue Tracker', Lower(User().Email) in Lower(EmailOwner))

to cover case non-compliant input

If your "Issue Tracker" data set is under 2000 records, or if you can collect a data set of under this amount with a delegable query (for example a status which is a string), then the In function above will work fine on this collection.

 

View solution in original post

2 REPLIES 2
Highlighted
Community Champion
Community Champion

Re: Permissions for multiple, specific users to view a record

Hi @Chappy024 ,

In smaller datasets, you could use the In function

Filter('Issue Tracker', User().Email in EmailOwner)

so if the user's email was anywhere in the field, it would find it. I would also use (from hard experience)
Filter('Issue Tracker', Lower(User().Email) in Lower(EmailOwner))

to cover case non-compliant input

If your "Issue Tracker" data set is under 2000 records, or if you can collect a data set of under this amount with a delegable query (for example a status which is a string), then the In function above will work fine on this collection.

 

View solution in original post

Highlighted
New Member

Re: Permissions for multiple, specific users to view a record

Thank you very much, the solution works perfectly!

 

Out of interest, would you say this only suitable for smaller data sets because of something to do with delegation? I only ask because for the foreseeable future this will be fine, but I may look to make something a little more robust should the need to keep more records increase.

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (8,643)