cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Combo Box Cascade With Multiple Select

Hi Everyone, 

 

I am trying to cascade combo box with multiple selected options. One has country and second has city. 

 

For example, for countries I choose USA & Australia, then second combo box should show cities like Chicago, New York, Sydney, Melbourne 

 

Right now for the items property of 2nd combo box  I have - "Distinct(Filter('Data List', Country = DataCardValue7.Selected.Result),City)" 

 

This is only showing the results based on the country that was last selected and not both the countries. 

 

Urgent help would be appreciated. 

 

Thanks,

Shreyans 

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @Anonymous ,

Try this, but note that is not Delegable

Distinct(
   Filter(
      'Data List', 
      Country in DataCardValue7.SelectedItems
   ),
   City
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

9 REPLIES 9
WarrenBelz
Super User
Super User

Hi @Anonymous ,

Try this, but note that is not Delegable

Distinct(
   Filter(
      'Data List', 
      Country in DataCardValue7.SelectedItems
   ),
   City
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

Anonymous
Not applicable

@WarrenBelz  can you please explain what you mean by "delegable"?

 

I am a beginner in Powerapps do not have much knowledge about it 

@Anonymous ,

Please have a read of this blog of mine

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Anonymous
Not applicable

@WarrenBelz  Sure will do. 

 

Also, I am facing one more issue. I am not able to see the selected value in edit or view mode. 

 

DefaultSelectedItems Property = "[Parent.Default]

 

Can you please help me out with this too. 

@Anonymous 

The DefaultSelectedItems of your Combo Box (as per your PM) will depend on what type of field you are writing back to in SharePoint (assume the field is called City)

If a Text Field

{Result:ThisItem.City}

If a Choice field

{Result:ThisItem.City.Value}

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Anonymous
Not applicable

@WarrenBelz 

 

I tried putting the code you have shared but it is still not showing the values in the edit mode or view mode

Do not know why is it not working 

 

{Result: ThisItem.City.Value}

@Anonymous ,

First thing to check - to be displayed in DefaultSelectedItems, the value stored in your data field must be in the schema (available choices) of the combo box. If not, it will simply not display (you will not get any errors).

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Anonymous
Not applicable

@WarrenBelz 

 

I changed the columns in sharepoint list from choices to text field. I applied {Result: ThisItem.Country} and {Result: ThisItem.City} 

 

However, for the country I am getting the right value back. For City I am getting this ("). Could you please give me some suggestion on solving it? 

@Anonymous ,

That is very basic code that should simply display the content of the field in the record selected. Have you checked the content of the City field in the record you are displaying?

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,907)