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

Cascading Multip Select Combo box

Looking for suggestions on the best way to approach this or syntax solution !

 

Sharepoint list 1:   Field1: DataCatID  Field2: DataCategory

Sharepoint List 2:   Filed1 DataCatID Field2: DataSubCategory

 

I have CB1  which uses Sharepoint List 1 Field2(DataCategory) for it's items and it's a multi-select combo box.

I then have CB2 also a multi select combo box and I want to filter this to show only Sharepoint List 2  Field2 (DataSubCategory) where DataCatID is the same as those chosen in CB1

 

Hope you can follow !    Thanks

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi@vfdd,

Could you please tell me the specific error message and how you set the Items property of these 2 Combo Boxes?

In my scenario, I set the Items property for the Combo Boxes as below:

Set the first Combo Box Items property as below:

Distinct(ColTT,DataCategory)

Set the second Combo Box Items property as below:

Filter(ColTT,DataCategory in ComboBox1.SelectedItems.Result).SubCa

120401Gif.gif

Best Regards,

Qi

View solution in original post

5 REPLIES 5
Helper III
Helper III

FYI   here's what I put. I'm getting an error against the equals sign but I know I'm close because it is working !  shows the right items just showing the error in edit mode  

 

Distinct(Filter(CollDataAttrib,DataCatID=
Text(LookUp(CollDataCat,DataCategory=CBDataCat.SelectedItems.Result).ID)
),Title)
Helper III
Helper III

Any suggestions?  if I change selectitems to selected  then the error goes away however it only picks up the items from the last choice on the previous combo box

Community Support
Community Support

Hi@vfdd,

Based on the issue that you mentioned, do you want to create cascading Combo Box?

Could you please share a bit more about the DataCategory and DataSubCategory, are they all Text type?

I have a test on my side, please take a try as below.

I advise that you could combine the two SP lists into a whole collection, then you could filter one column based on another column.

Add a Button and set the OnSelect property as below:

 

 

Collect(ColTT,AddColumns(ListA,"SubCa",LookUp(ListB,DataCatID=ListA[@DataCatID],DataSubCategory)))

 

Note: To avoid the  disambiguation issue, please refer to the Table[@FieldName].

Set the first Combo Box Items property as below:

 

Distinct(ColTT,DataCategory)

 

Set the second Combo Box Items property as below:

 

Filter(ColTT,DataCategory in ComboBox1.SelectedItems.Result).SubCa

 

Hope it could help.

Best Regards,

Qi

 

 

Helper III
Helper III

thanks @v-qiaqi-msft  That almost works, I think the approach with the collection is right but I'm getting an incompatible item error 

 

Here's my syntax 

 

 

Collect(CollDataAttributes,AddColumns(DataCategory,"SubCa",LookUp(DataAttributes,DataCatID=DataCategory[@DataCategoryID],DataAttribute)))

 

 

DataCategoryID is an ID field where as DataCatID is text field, I've tried putting Text( etc... before the look up but can't quite get it right

 

 

And when this field was a dropdown and not a multi-select combo this worked for me.  (Unfortunately I had to change it to multi-select combo for operational reasons)

Distinct(Filter(CollDataAttrib,DataCatID=
Text(LookUp(CollDataCat,DataCategory=DDDataCat.Selected.Result).DataCategoryID)
),DataAttribute)
Community Support
Community Support

Hi@vfdd,

Could you please tell me the specific error message and how you set the Items property of these 2 Combo Boxes?

In my scenario, I set the Items property for the Combo Boxes as below:

Set the first Combo Box Items property as below:

Distinct(ColTT,DataCategory)

Set the second Combo Box Items property as below:

Filter(ColTT,DataCategory in ComboBox1.SelectedItems.Result).SubCa

120401Gif.gif

Best Regards,

Qi

View solution in original post

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Solution Authors
Top Kudoed Authors
Users online (9,032)