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

How to check if user() exists on SharePoint list item which type is "Person or Group" ?

Hi all, I am new to PowerApps. Could anyone help me to lookinto this question  and let me know how to write the formula? Thanks.

 

I have a sharepoint which has a column called "Reviewer" which type is "Person or Group" , and allows multiple selection. Now I am creating a PowerApp and plan to show all the items which "Reviwer" contains current user. What should I write the formula in Powerapps. I tried as below, but it dosen't work.

 

Filter('Support List', Find(User().Email,Reviewer.Email)>0)

 

User().email = "D@ms.com"

 

SharePoint Name  - "Support List"

ID   Value   Reviwer

1     aaa     A@ms.com ; B@ms.com

2     bbb     A@ms.com ; B@ms.com ; D@ms.com

3     ccc      C@Anonymous.com

4     ccc      C@ms.com ; D@ms.com

 

PowerApps - the BrowseGallery is supposed to show after filtering

2     bbb     A@ms.com ; B@ms.com ; D@ms.com

4     ccc      C@ms.com ; D@ms.com

1 ACCEPTED SOLUTION

Accepted Solutions
Advocate I
Advocate I

You could try

 

Filter('Support List',User().Email in Reviewer)

 

The In function is delegatable to sharepoint which is a bonus.

 

You shouldn't need the .Email after the Reviewer as the column is just called 'Reviewer'

 

Also I don't know if it's a typo but the column in your example is titled 'Reviwer' with a missing 'e'?

 

You might also want to consider assigning User().email to a variable with 

 

Set(User().Email),User_Email) then

Filter('Support List',Filter('Support List',User_Email in Reviewer)

 

This avoids a network call everytime User().Email is used in the filter

 

My first time giving advice so I hope it works!

View solution in original post

3 REPLIES 3
Advocate I
Advocate I

You could try

 

Filter('Support List',User().Email in Reviewer)

 

The In function is delegatable to sharepoint which is a bonus.

 

You shouldn't need the .Email after the Reviewer as the column is just called 'Reviewer'

 

Also I don't know if it's a typo but the column in your example is titled 'Reviwer' with a missing 'e'?

 

You might also want to consider assigning User().email to a variable with 

 

Set(User().Email),User_Email) then

Filter('Support List',Filter('Support List',User_Email in Reviewer)

 

This avoids a network call everytime User().Email is used in the filter

 

My first time giving advice so I hope it works!

View solution in original post

Thanks.

 

Finally "Filter('Support List',User_Email in Reviewer.Email)" works for me. 

Edit: Sorry, posted to wrong thread.  Cant delete?

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (11,271)