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 / Change Visibility of a...
Power Apps
Answered

Change Visibility of a button based on mulitple fields being blank

(0) ShareShare
ReportReport
Posted on by 1,362

I have tried a coulple different ways to hide the Icon/button that launches/submits the patch but without success.
What am I missing?

Formula #1: If(IsEmpty(txtPurchaseFrom.Text) || IsEmpty(txtAddress.Text) || IsEmpty(txtCity.Text) || IsEmpty(txtProjectNumber.Text) || IsEmpty(txtTaskNumber.Text),false,true) && gblAction = "edit" || gblAction = "new"

Formula #2: f(!IsEmpty(txtPurchaseFrom.Text) || !IsEmpty(txtAddress.Text) || !IsEmpty(txtCity.Text) || !IsEmpty(txtProjectNumber.Text) || !IsEmpty(txtTaskNumber.Text),false,true) && gblAction = "edit" || gblAction = "new"

Formula #3: If(!IsBlank(txtPurchaseFrom.Text) || !IsBlank(txtAddress.Text) || !IsBlank(txtCity.Text) || !IsBlank(txtProjectNumber.Text) || !IsBlank(txtTaskNumber.Text),false,true) && gblAction = "edit" || gblAction = "new"

 

Formula #4: If(And(!IsBlank(txtPurchaseFrom.Text), !IsBlank(txtAddress.Text), !IsBlank(txtCity.Text), !IsBlank(txtProjectNumber.Text), !IsBlank(txtTaskNumber.Text)),false,true) && gblAction = "edit" || gblAction = "new"

Categories:
I have the same question (0)
  • Akser Profile Picture
    1,546 Moderator on at

    Hi @golfnutt82,

     

    It would be great if you could also explain your requirement? Do you want to hide the icon/button unless all fields are filled in and the hblAction is 'edit' or 'new'?

  • golfnutt82 Profile Picture
    1,362 on at

    Yes, as I said, I want to hide the icon if any of the fields mentioned in the formula isEmpty.
    I have tried many different ways and none are working.

    Here is some more context.
    The variable gblAction is set on from the App "OnStart" property.

    golfnutt82_0-1675693055793.png

     

  • Verified answer
    Akser Profile Picture
    1,546 Moderator on at

    @golfnutt82 wrote:

    Yes, as I said, I want to hide the icon if any of the fields mentioned in the formula isEmpty.

    No, you did not.

    If(
     !IsBlank(txtPurchaseFrom.Text) And 
     !IsBlank(txtAddress.Text) And 
     !IsBlank(txtCity.Text) And 
     !IsBlank(txtProjectNumber.Text) And 
     (gblAction = "edit" Or gblAction = "new"),
     true,
     false
    )
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @golfnutt82

    IsEmpty() refers to tables, IsBlank() refers to a single record or Value. You never need If() when using the visible property as the formula you use reduces to true or false by itself. ie.

    Or(!IsBlank(txtPurchaseFrom.Text),
    !IsBlank(txtAddress.Text),
    !IsBlank(txtCity.Text),
    !IsBlank(txtProjectNumber.Text),,
    !IsBlank(txtTaskNumber.Text)
    ) && gblAction = "edit" || gblAction = "new"

    Is either true or false

  • golfnutt82 Profile Picture
    1,362 on at

    I apologize I wasnt more clear.
    This worked so thanks for your time.

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 431

#2
WarrenBelz Profile Picture

WarrenBelz 360 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 280 Super User 2026 Season 1

Last 30 days Overall leaderboard