Showing results for 
Search instead for 
Did you mean: 

Filter gallery for blank items in combo box

Hi all,


I've had a look around online and in the forum and not found quite what I was looking for.

I'm using a SharePoint list as my data source to populate a gallery. I've created a collection to populate a dropdown box like this:








 So far so good. I have a collection with the first item being "<Unassigned>" and the rest of the fruit below that.


What I'd like to do is be able to filter my gallery specifically on "<Unassigned>", and to return only those records where the fruit type is blank.

I've tried my code like this:




    fruitType = Substitute(Last(FirstN(ComboBoxFruit.SelectedItems,1)).Value,"Unassigned>",Blank()




I was hoping PowerApps could do the simple substitute for a Blank() result and compare that against the SP list but no luck.

When I test like this:




Filter(Sales,fruitType = Blank())




... it works just fine.


Thank you in advance,


Community Support
Community Support

Hi @Attila_the_Hun ,


Please try this:

If(ComboBoxFruit.Selected,Value="<Unassigned>",Filter(Sales,fruitType = Blank()))


Best Regards,


Thanks for the suggestion, but my items property on the gallery is already very complex based on several if conditions. This has arisen from the simple fact I can't use a variable from within the app in my SortByColumns function without hitting delegation.


If I were to use your solution I'd have to create a whole new set of If conditions to sort my data.

Community Support
Community Support

Hi @Attila_the_Hun ,


The formula you provided is inconsistent with your needs so I can't modify your formula.


Best Regards,


Helpful resources

Power Apps News & Annoucements carousel

Power Apps News & Announcements

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

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

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 (3,985)