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

Filter dropdown list with multi select option

Hi Team,

I Have 2 dropdown field in SharePoint list (Category and Subcategory)with multi select option. How do i filter sub category field based on category field. Both the fields have option to select multiple values. Also These fields are lookup values.

 

 

Thanks,

1 ACCEPTED SOLUTION

Accepted Solutions
v-siky-msft
Community Support
Community Support

Hi @Sreeraj_r ,

 

How did you define the items property of Category dropdown?

Does the Category dropdown allow multiple selections?

I made a test on my side based on your description, and the following workaround should work for you.

1. Set Category dropdown.Items: 

Choices('SP list'. Category)

2. Set Category dropdown.OnChange: 

Clear(AID);ForAll('SP list',If(!(false in ForAll(CategoryComboBox.SelectedItems,If(Id in Category.Id,true,false))),Collect(AID,ID)))

AID is the collection storing all items'ID that meet Category dropdown selections

3. set Subcategory dropdown.Items:

Filter(Choices('SP list'.Subcategory),Id in Concat( Filter(AddColumns('SP list',"NewColumn",Concat(Subcategory,Id & " ")),ID in AID).NewColumn, NewColumn & " "))

Snipaste_2020-05-01_11-38-16.pngSnipaste_2020-05-01_11-38-28.png

Hope this helps.

Sik

 

View solution in original post

1 REPLY 1
v-siky-msft
Community Support
Community Support

Hi @Sreeraj_r ,

 

How did you define the items property of Category dropdown?

Does the Category dropdown allow multiple selections?

I made a test on my side based on your description, and the following workaround should work for you.

1. Set Category dropdown.Items: 

Choices('SP list'. Category)

2. Set Category dropdown.OnChange: 

Clear(AID);ForAll('SP list',If(!(false in ForAll(CategoryComboBox.SelectedItems,If(Id in Category.Id,true,false))),Collect(AID,ID)))

AID is the collection storing all items'ID that meet Category dropdown selections

3. set Subcategory dropdown.Items:

Filter(Choices('SP list'.Subcategory),Id in Concat( Filter(AddColumns('SP list',"NewColumn",Concat(Subcategory,Id & " ")),ID in AID).NewColumn, NewColumn & " "))

Snipaste_2020-05-01_11-38-16.pngSnipaste_2020-05-01_11-38-28.png

Hope this helps.

Sik

 

View solution in original post

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

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

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 (3,805)