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 / Use IsEmpty with Data ...
Power Apps
Answered

Use IsEmpty with Data Table

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello,

I am using a data table with search fields to select a record to view or update.  I want a certain group of controls to be visible if there is a selection in the data table.  I use the formula:

"If(!IsEmpty(DataTable.Selected),Set(varVisible,true),Set(varVisible,false)"

 

This is throwing all kinds of errors.

 

Any help would be appreciated.

Categories:
I have the same question (0)
  • Verified answer
    CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @kaykayme You can simplify the formula like this and see if the errors are gone,

    Set(varVisible, IsBlank(DataTable.Selected))

     

    Please remember to give a 👍 and accept my solution as it will help others in the future.

  • Verified answer
    CarlosFigueira Profile Picture
    Microsoft Employee on at

    The IsEmpty function checks whether a table is empty (i.e., does not have any records). DataTable.Selected returns a record. If you want to check whether nothing is selected, you can use the IsBlank function:

    Set(varVisible, Not IsBlank(DataTable.Selected))

    Hope this helps!

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
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard