cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Super User III
Super User III

Re: how to filter drop down based on two columns in sharepoint

@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
Highlighted
Super User III
Super User III

Re: how to filter drop down based on two columns in sharepoint

@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

Highlighted
Helper IV
Helper IV

Re: how to filter drop down based on two columns in sharepoint

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

Highlighted
Super User III
Super User III

Re: how to filter drop down based on two columns in sharepoint

@Pricilla 

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

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,767)