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 / Power Apps - The IsEmp...
Power Apps
Suggested Answer

Power Apps - The IsEmpty function does not work

(1) ShareShare
ReportReport
Posted on by 2
I have developed an application in Power apps and I am creating a collection from the database.
When I look in the collection, canceled columns sound empty, but the IsEmpty function does not work correctly, it gives me false, when in fact it is true.
If I replace the condition and check with "" then the check is correct.
I noticed that this IsEmpty function does not work correctly when I check for a collection.
Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    154,799 Most Valuable Professional on at
    That is because IsEmpty and IsBlank are two different things. IsBlank tests for a null value whereas "" is an empty string and will return true for IsEmpty, The easiest way is to use Len(YourValueHere) = 0 - a Length of zero will return true for both blank and empty elements. If it is a Table (collection or gallery), then use CountRows(YourTableHere) = 0
     
    Please click Does this answer your question 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 a Like.
    MVP (Business Applications)     Visit my blog Practical Power Apps    Buy me a coffee

     
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,969 Moderator on at
    Hi,
     
    So you would have to share your code and actually share the run time value of your Collection. IsEmpty does work, but it depends on what you have in the collection.
     
    [] would be true
    but "" isn't
     
    and so on. So when you say it doesn't work I'd be a months deserts you don't have an empty collection, at least not one that fits the definition of IsEmpty
     
    Can you please share a picture of a text label, on the screen, with IsEmpty(CollectionName) and at the same time, you can open and look at the Collection itself and sow a picture of what it says is in it
  • ND-02021429-0 Profile Picture
    4 on at
    I'm pretty sure IsEmpty just doesn't work as designed. You can have a power app that creates a new SharePoint list item, so by definition, there can be NOTHING in a column, and it'll still incorrectly spit out a false every single time. While for editing an existing item, it works exactly as it should. At least it's consistently wrong so you can design around it, even if doing so is a huge waste of time.
  • Suggested answer
    rzuber Profile Picture
    552 Moderator on at
    Warren and Michael are both right. The IsEmpty() function works absolutely as described. Check out the official Microsoft formula reference here where it describes the IsEmpty() function as being the equivalent of using CountRows() = 0.
     
    @ND-02021429-0 & @LR-25101357-0 This is a simple case of misunderstanding the function.
     
    Your table is not empty if it has any rows in it, even if those columns are blank.
     
    Let's use the following table as an example:
    Set(
      myTable,
      [
        { col1: "hi",    col2: Blank() },
        { col1: "there", col2: Blank() },
        { col1: "buddy", col2: Blank() }
      ]
    )

    Here are some example situations using IsEmpty on the above table
    // Returns false because there are rows in the table
    IsEmpty(myTable)
    
    // Returns true because there are no rows with potato in col1
    IsEmpty(Filter(myTable, col1 = "potato"))
    
    // Returns false because I did not filter the table and it still has 3 rows
    IsEmpty(myTable.col2)
    

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 536

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard