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

Filter Multi-PeoplePicker

Hello,

 

I am trying to display dropdown values by filtering a SharePoint list that contains a people picker "Assigner" that could have more than 2 people. I am checking if the current user logged in is within the "Assignee" people picker. If it is, then I need to display the title of the record. 

For example (IF you are "Bob"):

TitleAssigneeManager
Project ABob, Matt, JoeMary
Project BBob, JoeDiego
Project CAntonioMary


My dropdown should only display Project A and Project B since "Bob" is assigned as one of the "Assignees". 

The tricky part about this is that the "Assignee" column gets returned as a table and when you wrap around the filter it doesn't work as expected. 

Andres-san_0-1600755655865.png

 

so far I've tried many methods but these have been the closest to the solution:

 

Filter(Projects,!IsEmpty(Filter(Assignees.Email,Email= User().Email))).Title

Filter(Projects,LookUp(Assignees, Email = User().Email,Email) = User().Email).Title

4 REPLIES 4
RandyHayes
Super User
Super User

@Andres-san 

Consider trying this formula to see if you get closer:

Filter(Projects, User().Email in Assignees.Email)

Should give you what you need.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes,

Thanks! This works if I compare it against a string type but not the people picker table. 

Hi @Andres-san ,

Use below code for your issue.

hope this will help you to resolve your issue.

 

Filter(AddColumns(TestAkshay,"AllAssignedEmail",Concat(Candidate,Email,";")),Lower(User().Email) in AllAssignedEmail)

 

VijayTailor_0-1601315366522.png

VijayTailor_1-1601315384361.png

Thanks,
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

@Andres-san 

I'm not sure what you mean by the people picker table.

You mentioned that the Assignees is a multi-selectable person column in your SharePoint list.

So, using the data example you provided, this formula should return Project A and Project B if the user is Bob

Filter(Projects, User().Email in Assignees.Email)

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (3,477)