cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Pricilla
Helper IV
Helper IV

how to filter drop down based on two columns in sharepoint

hi,

 

I have 3 columns in my sharepoint list, column A(single select person), column B(multi select person), column C(projectID), i want to add a filter to a dropdown, where it should show project IDs of the current user, if the user's name is in column A or column B

1 ACCEPTED SOLUTION

Accepted Solutions
mdevaney
Super User III
Super User III

@Pricilla 

I would recommend you FILTER based on the user's email, not their name.  Two people might have the exact same name.  Therefore, to show projects for the current user I would use this code in the Items property of the dropdown.

 

Filter(your_sharepoint_list, ColumnA.Email=User().Email, User().Email in ColumnB.Email).ColumnProject

 

You will get a delegation warning but it can't be avoided.  The IN operator cannot be delegated in SharePoint.  This is simply a limitation of using multi-select people with SharePoint. 

 

User().Email in ColumnB.Email

 

---
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."

View solution in original post

3 REPLIES 3
mdevaney
Super User III
Super User III

@Pricilla 

I would recommend you FILTER based on the user's email, not their name.  Two people might have the exact same name.  Therefore, to show projects for the current user I would use this code in the Items property of the dropdown.

 

Filter(your_sharepoint_list, ColumnA.Email=User().Email, User().Email in ColumnB.Email).ColumnProject

 

You will get a delegation warning but it can't be avoided.  The IN operator cannot be delegated in SharePoint.  This is simply a limitation of using multi-select people with SharePoint. 

 

User().Email in ColumnB.Email

 

---
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."

View solution in original post

@mdevaney , thanks for the response, i used a collection to get the expected result

@Pricilla 

If you found a solution please close the thread so the forums know its solved.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (4,134)