web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Dropdown list to filte...
Power Apps
Unanswered

Dropdown list to filter a gallery (considering showing blanks as well as to show empty to return all values)

(0) ShareShare
ReportReport
Posted on by 138

Hello,

I need help to create a dropdown list not combobox with the option to show blank values when blank is selected from dropdown options as well as to show all values when the dropdown list is empty (I could not use empty expression with dropdown list) hence am wondering how can this be done.

Thanks,

Categories:
  • WarrenBelz Profile Picture
    156,528 Most Valuable Professional on at

    Hi @MSDigitalUser ,

    Two things - set AllowEmptySelection to true and then in the Items - you did not post your existing Items but as an example if the output is .Value

    Ungroup(
     Table(
     {Menu: {Table({Value:""})},
     {Menu: YourExistingItemsHere}
     ),
     "Menu"
    )

    You can call Menu whatever you want.

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • MSDigitalUser Profile Picture
    138 on at

    Unfortunately I am getting the below errors (it is value)

    HaithamN_0-1687914880163.png

     

  • MSDigitalUser Profile Picture
    138 on at

    and how can this expression differntiate later if the dropdown list is blank or empty?

  • WarrenBelz Profile Picture
    156,528 Most Valuable Professional on at

    @MSDigitalUser ,

    Just missing a bracket - now fixed - also what is 'EM_ID' ?

    Sorry - I do not understand the second question.

  • MSDigitalUser Profile Picture
    138 on at

    Hi @WarrenBelz 
    EM ID is my column where I need to add in the dropdown list.
    my 2nd question was how will I filter the gallery to return blank values from the dropdown, and how to get all values when it is empty? because now when we add "" it will consider it as blank not empty

  • WarrenBelz Profile Picture
    156,528 Most Valuable Professional on at

    Hi @MSDigitalUser ,

    I would need the Items of the gallery for that. 

  • MSDigitalUser Profile Picture
    138 on at

    Sorry @WarrenBelz  I got confused, the above expression for the dropdown list is also showing error, I used before distinct(SPL,EM ID)

    my gallery items:

    Filter(
    AddColumns(
    'SPL',
    "Quarters",
    "Q" & RoundUp(
    Month('Planned Date') / 3,
    0
    )
    ),
    Len(DropEM.Selected.Value) = 0 || 'EM ID' = DropEM.Selected.Value,
    Len(DropStatus.Selected.Value) = 0 || Status.Value = DropStatus.Selected.Value
    )

  • WarrenBelz Profile Picture
    156,528 Most Valuable Professional on at

    @MSDigitalUser ,

    The Len( . . .) = 0 syntax covers both Blank or Empty. I also think you are missing the quotes off 'EM_ID' in the Distinct formula, but am still not totally clear on your question.

  • MSDigitalUser Profile Picture
    138 on at

    Hi @WarrenBelz , I used the below and it worked, doesnot know if this will continue to work:

    If(Or(DropEM.Selected.Value=Blank()), Len(DropEM.Selected.Value) = 0, DropEM.Selected.Value in 'EM', 'EM' = DropEM.Selected.Value, (DropEM.Selected.Value=""), Len(DropEM.Selected.Value) = 0 ),

     

    Now, if no selection, it returns all gallery items, if blank is selected, it brings only blank items.

  • WarrenBelz Profile Picture
    156,528 Most Valuable Professional on at

    Hi @MSDigitalUser ,

    You do not need all of that - just this assuming EM is a Text field

    Filter(
     DataSource,
     Or(
     Len(DropEM.Selected.Value) = 0, 
     DropEM.Selected.Value in 'EM'
     )
    )

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard