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

filter not returning all values in drop down

Hi All, 

 

so i wanted to created a cascading drop down field for a location list but when i use the filter function it only give me the first result.

 

Countrylocation
UK buckingham palace
UK victoria station
Germany Bremen 
ItalyRome
ItalyVenice
ItalyTurin

 

Filter(Listname, Country = DDCountry.selected.value)

 

so for example. 

 

if i look for Italy i only get Rome as my only result. 

 

thank you in advance for the help.

1 ACCEPTED SOLUTION

Accepted Solutions
v-qiaqi-msft
Community Support
Community Support

Hi @Ash2,

Do you want to filter the location dropdown based on the country dropdown selected?

Could you please tell me that:

  1. if the location column is a Choice type which allows multi select in your SP list?
  2. if you have a Combo Box or Dropdown box to fill in the location values?

There are many contradictions in your description, if you set the country drop down Items as below, you should refer to DDCountry.Selected.Name rather than DDCountry.Selected.Value.

Table({Name:"UK"},{Name:"Germany"},{Name:"Italy"})

I assume that this is a Choice type which allows multi select in your SP list.

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

Set the Items property of the Dropdown control as below:

Ungroup(Filter(Listname, Country in Dropdown1.Selected.Value).location,"location")

Please check if it helps.

Regards,

Qi

 

 

 

Best Regards,
Qi

View solution in original post

7 REPLIES 7
RandyHayes
Super User
Super User

@Ash2 

If you want to filter on multiple selections then you will need to do this in your Formula:

Filter(Listname, Country in DDCountry.SelectedItems.Value)

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes 

 

thank you for the help, i tried what you suggested but its not working 😞 

 

country drop down values.

Table({Name:"UK"},{Name:"Germany"},{Name:"Italy"})

 

locations comes up empty and with a error 

notworking.PNG

country.PNG

RandyHayes
Super User
Super User

@Ash2 

Your formula is not as I suggested.  You have equal sign where in should be:

Filter(Location_1, Country in DDCountry.SelectedItems.Value)
_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Hi @RandyHayes 

 

sorry, i changed it but i am getting the below.

Ash2_0-1616429774246.png

 

i changed the formula but again im only getting one result when it should be 3.

Ash2_2-1616430245885.png

 

 

 

RandyHayes
Super User
Super User

@Ash2 

Never use SelectedText - it is a deprecated property and at any rate, it will not give you what you want.

What is the Items property of Dropdown6?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
v-qiaqi-msft
Community Support
Community Support

Hi @Ash2,

Do you want to filter the location dropdown based on the country dropdown selected?

Could you please tell me that:

  1. if the location column is a Choice type which allows multi select in your SP list?
  2. if you have a Combo Box or Dropdown box to fill in the location values?

There are many contradictions in your description, if you set the country drop down Items as below, you should refer to DDCountry.Selected.Name rather than DDCountry.Selected.Value.

Table({Name:"UK"},{Name:"Germany"},{Name:"Italy"})

I assume that this is a Choice type which allows multi select in your SP list.

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

Set the Items property of the Dropdown control as below:

Ungroup(Filter(Listname, Country in Dropdown1.Selected.Value).location,"location")

Please check if it helps.

Regards,

Qi

 

 

 

Best Regards,
Qi

View solution in original post

@Ash2 

Also, looking back at your prior posts, you seem to indicate that the dropdown items were:

Table({Name:"UK"},{Name:"Germany"},{Name:"Italy"})

So then the formula I mentioned should be:

Filter(Location_1, Country in DDCountry.SelectedItems.Name)
_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

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 (1,704)