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 / Making a button visibl...
Power Apps
Answered

Making a button visible if *either* of two fields is not empty

(0) ShareShare
ReportReport
Posted on by 332

I'm working on an app where I'd like a particular button to appear only if either of two fields in a gallery have data in them. 

 

Field 1 has data but Field 2 is empty: Button appears

Field 1 is empty but Field 2 has data: Button appears

Field 1 and Field 2 both have data: Button appears

Field 1 is empty and Field 2 is empty: Button does not appear

 

I've tried various formulas for the Visible property of the button, but nothing seems to work.

 

Is this possible? Any help would be appreciated. Thanks.

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @T_A_M 

    Set visible property of button to

    !IsBlank(Textinput1.Text)||

     !IsBlank(Textinput2.Text)

  • Verified answer
    Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    On visible property write this:

     

    If(IsEmpty(Field1) && IsEmpty(Field2), false, true)

    If that does not work, try with IsBlank

     

    But, I think that you should do something different.. The button is inside the gallery, right?

    Try this:

     

    If(IsEmpty(ThisItem.Field1) && IsEmpty(ThisItem.Field2), false, true)

     

    If that does not work, try with IsBlank

     

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,

    Gonçalo Nogueira

    Check my LinkedIn!

    Buy me a coffee!

    Check my User Group (pt-PT)!

    Last Post on Community

    My website!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @T_A_M,

    would you please provide a ScreenShot of fields or explain what are the data types of the fields? 
    If it's a Single Line Text, then;

    Button -> Visible= If(!IsBlank(ThisItem.Field1) || !IsBlank(ThisItem.Field2),true,false)

  • T_A_M Profile Picture
    332 on at

    Thank you! IsBlank 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

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!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 549 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 225 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 224

Last 30 days Overall leaderboard