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 / CountRows(), IsBlank()...
Power Apps
Unanswered

CountRows(), IsBlank(), IsEmpty() in Combobox not working properly

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I'm using a 3 Comboboxes top of a page and trying to show a gallery filter based on selected value of combobox. 

 

At initial load of the screen, the gallery should show all of the items available in the datasource(SQL). So I'm using this condition.

 

 

 

CountRows(Combobox1.SelectedItems)=0 

 

 

 

 When the screen loads for the first time, this condition is not working at all, it is giving null. So I thought of using IsBlank or IsEmpty function for the same Combobox selected items property. But IsBlank and IsEmpty are workly perfectly for initial load but not working if we clear the Combobox back to no.

 

Can anyone suggest ? 

Categories:
I have the same question (0)
  • mdevaney Profile Picture
    29,991 Moderator on at

    @Anonymous 
    Where exactly are you using this code?  Inside what control?  In which property?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @mdevaney 

     

    This is used in Gallery items. for ex: Gallery Items is 

     

    If(CountRows(combobox.SelectedItems)=0,'datasource1',
    CountRows(combobox1.SelectedItems)=0,'datasource2')

     

    But my actual combo box is 3.

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous :

    I've made a test:

    When the comboxbox control is empty——

    • The value of ComboBox.SelectedItems is a table, even if there is no record in it, powerapp does not seem to think it is a Blank() value.
    • ComboBox.Selected can be Blank().

    Therefore, I suggest you try this formula:

     

    IsBlank(ComboBox.Selected)

     

    Best Regards,

    Bof

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 534

#2
WarrenBelz Profile Picture

WarrenBelz 416 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 306

Last 30 days Overall leaderboard