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 / Empty combobox, wrong ...
Power Apps
Answered

Empty combobox, wrong IsBlank value

(0) ShareShare
ReportReport
Posted on by 322

I set a bunch of combo-boxes (single selection) as filters for the gallery.

While filters do work using Combobox1.Selected.Value, IsBlank or IsEmpty show false, even if empty.

I need it to work because I want to display a banner that says "filters are active" when at least one filter is triggered.

Now, that banner is always active, even if there is nothing in the combo boxes.

 

Can somebody please tell me the correct syntax for evaluating is there a selected item in the combo box?

Categories:
I have the same question (0)
  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @vladimir84,

    Check the second reply.

    Best Regards,

    Qi

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi@vladimir84,

    Combine that with your description, I think you have some misunderstanding with the IsBlank() function and the IsEmpty() function.

    The IsBlank() function is used to check if a value is Blank. The IsEmpty() function is used to test whether a table contains any records, in other words, the IsEmpty() function is used to detect if there is no records within a Table.

    More details about IsBlank() function and IsEmpty() function, please check the following article:

    IsBlank() function and IsEmpty() function

    I have a test on my side and the situation is confirmed on my side.

    Add a Label and set the Text property as below:

     

    "" = Blank() 

     

    04.png

    Empty string ("") refers to a string that contains no characters. 

    The Empty string ("") is not equal to Blank. You could see that the above formula would always return false, that is proof.

    I assume that there is no "" value within the array data related to the Combo Box, if you want to check if a Combo Box value is Blank, please take a try with the following workaround:

    Add a Button and set the DisplayMode property of the Button1 as below:

     

    If(
     IsEmpty(ComboBox1.SelectedItems),
     DisplayMode.Disabled,
     DisplayMode.Edit
    )

     

    Add a Label and set the Text property as below:

     

    "filters are active"

     

    Set the Visible property of the Label as below:

     

    If(Button1.DisplayMode=Edit,true,false)

     

    Hope it could help.

    111701GIF.gif

    Best Regards,

    Qi

     

  • vladimir84 Profile Picture
    322 on at

    Dear @v-qiaqi-msft ,

    Thank you for your answer.

    IsEmpty(ComboBox1.SelectedItems) does not work (shows true when the list is empty) and this was the main reason why I was asking the question, I suspected that there is a bug.

    Now the question is, has this ever happened before?

    If yes, let's see the solution, if no, I'll open a support ticket.

     

    I have to provide you with some constructive criticism, given that you're an employee of MS rather than a volunteer.

    • The aim of the question is to find the specific solution - your answer is overly exhaustive and (even though I'm sure you're only trying to help) it looks like you're lecturing the client on basics, because of what you think happened. My suggestion: hyperlink the references and examples, keep the answers very brief, and ask for more information when you think something happened (sometimes, you might be thinking in the wrong direction for the right reasons).
    • IsBlank and IsEmpty are used interchangeably in the question for a reason, they have been under-documented and unintuitive (you'd use one with Filter the other with Lookup and they both do exactly the same thing). Add to that a redundant coding for combobox (Selected and SelectedItems), and reliance on the forums and youtube, the requirement becomes giving a precise formula for the outcome, to eliminate any doubt what to use in that situation. 

    Br,

     

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @vladimir84 

    In your case of testing the SelectedItems, you can use this formula:

       CountRows(Combobox1.SelectedItems)=0

    This will be true if nothing is selected and false if items are selected.

    I hope this is helpful for you.

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi@vladimir84,

    Based on your needs, I think you could combine the IsEmpty() and IsBlank().

    In my scenario, I add a Label and set the Visible property as below:

    If(
     IsEmpty(ComboBox1.Selected) Or IsBlank(ComboBox1.Selected),
     false,
     true
    )

    Note: Please do use the ComboBox1.Selected rather than the ComboBox1.Selected.Value

    Best Regards,

    Qi

     

  • vladimir84 Profile Picture
    322 on at

    @RandyHayes 

    Take a look, I think something is buggy with the app (perhaps the passage of development version?). I'm thinking I'll export-import it as a new one, and try that.

    vladimir84_0-1606119618914.png

     

  • vladimir84 Profile Picture
    322 on at

    @v-qiaqi-msft 

    Hi Qi,

    Your solution works! I will take it as instruction to use Selected instead of SelectedItems.

    Thank you.

    vladimir84_1-1606119791055.png

     

  • EnochStrok Profile Picture
    57 on at

    For some reason there seems to be an additional bug that is going on with the combobox. Sometimes I will adjust the formula in the "Items" properties. It will not show any errors, and then what happens is the correct number of distinct categories will show up, and when I select them, the other dependent comboboxes will respond to the selection, but the original combobox only shows blank values... Then I copy and paste that formula, delete the combobox, and create a new one, paste the formula in, and it works, even though I have not made any changes to the formula. This is a bizare bug.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard