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

Filtering blank values from a dropdown

Hello again.

 

Is there an easy way of filtering blank value from a dropdown box items list?

 

Suppose I have a table or collection (Fruit) that looks like this;

 

Apple, Granny Smith, Green

Apple, Pink Lady, Red

Apple, , Pink

Plum, Victoria, Green

Plum, Cherry, Purple

Plum, , Black

 

The idea is that dropdown1 would select Apple or Plum.

 

Dropdown 2 items is filled with Column2 where Column1='Apple'. and dropdown3 is filled with column3 where Column1 = 'Apple'

 

I have got the dependencies working ok, so that dropdowns 2 and 3 only display what's appropriate for the selected fruit.

 

The problem is that where the options in columns 2 and 3 are not the same number of rows, the blanks appear in the dropdown. So, for example, there are only two options for the type of apple, (Granny Smith and Pink Lady) but three colours. This means that there will be a blank in dropdown2 after Pink Lady.

 

I have tried the Filter command with !IsBlank but to no avail.

1 ACCEPTED SOLUTION

Accepted Solutions
Martin_W
Helper III
Helper III

I finally got this working!

 

So this is now the code that's in the second dropdown (remember it's dependent upon the value in the first)

 

Filter(Collection2, !IsBlank(RecordValue ), iParentId = ddDropdown1.Selected.ParentId)

View solution in original post

2 REPLIES 2
BCBuizer
Super User
Super User

Hi @Martin_W ,

 

Can you share the current code you have for the Items property of dropdown2? 



Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.
Martin_W
Helper III
Helper III

I finally got this working!

 

So this is now the code that's in the second dropdown (remember it's dependent upon the value in the first)

 

Filter(Collection2, !IsBlank(RecordValue ), iParentId = ddDropdown1.Selected.ParentId)

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,218)