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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
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

@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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
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
Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Government Carousel

New forum: GCC, GCCH, DoD - Federal App Makers (FAM)

In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.

Users online (2,237)