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 / Hide a button if field...
Power Apps
Answered

Hide a button if field in collection empty

(0) ShareShare
ReportReport
Posted on by 1,257 Super User 2024 Season 1

I have a collection which will only ever have 1 record in it.  I'd like to hide a button if one of  fields in the collection is empty

I have tried this :

 

Visible: 
If(
 IsEmpty(MyCollection.Field1) ||
 IsEmpty(MyCollection.Field2) ||
 IsEmpty(MyCollection.Field3) ||
 IsEmpty(MyCollection.Field4) ||
 IsEmpty(MyCollection.Field5) ||
 IsEmpty(MyCollection.Field6),
 false,
 true
)

 

  and this

 

Visible: 
If(
 IsEmpty(MyCollection.Field1) &&
 IsEmpty(MyCollection.Field2) &&
 IsEmpty(MyCollection.Field3) &&
 IsEmpty(MyCollection.Field4) &&
 IsEmpty(MyCollection.Field5) &&
 IsEmpty(MyCollection.Field6),
 false,
 true
)

 

but button still invisible even if all those fields have data in them.    Have also tried IsBlank instead of IsEmpty

 

Any ideas?

 

TIA

Categories:
  • BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    Hi @vffdd ,

     

    The below should do the trick:

    Not(
     IsBlank(MyCollection.Field1) ||
     IsBlank(MyCollection.Field2) ||
     IsBlank(MyCollection.Field3) ||
     IsBlank(MyCollection.Field4) ||
     IsBlank(MyCollection.Field5) ||
     IsBlank(MyCollection.Field6)
    )
  • Verified answer
    Forbs Profile Picture
    35 on at

    As you only ever have one item in your collection you may want to use the 'First' function to access it. Then use a similar function as in your first image but you need to be using IsBlank(). I think a function like this may work:

     

    Visible: 
    If(
     IsBlank(First(MyCollection).Field1) ||
     IsBlank(First(MyCollection).Field2) ||
     IsBlank(First(MyCollection).Field3) ||
     IsBlank(First(MyCollection).Field4) ||
     IsBlank(First(MyCollection).Field5) ||
     IsBlank(First(MyCollection).Field6),
     false,
     true
    )

     

  • vffdd Profile Picture
    1,257 Super User 2024 Season 1 on at

    thanks @Forbs  that worked perfectly

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 352 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 323

#3
Mohsin Ali Profile Picture

Mohsin Ali 226

Last 30 days Overall leaderboard