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 / IsBlank and Displaymod...
Power Apps
Answered

IsBlank and Displaymode Not working as expected.

(0) ShareShare
ReportReport
Posted on by 12

Hello All,

I'm new to Power Apps and the community, and need some assistance.  I've searched several posts but have not been successful in finding a solution to my problem.  I have a custom form with TextInput fields.  I would like to disable an icon only when all  TextInput fields are blank, otherwise enable it. 

 

I applied the following statement to the DisplayMode of the icon:

If(IsBlank(TextInputAddID.Text) && IsBlank( TextInputAddLocation.Text) && IsBlank(TextInputAddRestriction.Text), DisplayMode.Disabled, DisplayMode.Edit)

 

The icon is disabled when all fields are blank but when I enter text into one of the fields, the icon becomes enabled.  I only want the icon to be enabled when all fields have text in them.  What am i doing wrong?

Categories:
I have the same question (0)
  • eka24 Profile Picture
    20,925 on at

    Replace && with Or

     

    If(IsBlank(SearchProductCode.Text) Or IsBlank( SearchProductCode_1.Text) Or
    IsBlank(SearchProductCode_2.Text), DisplayMode.Disabled, DisplayMode.Edit)

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Verified answer
    B@houston Profile Picture
    on at

    Hello @fdenman ,

     

    I tried below revised function and it works as expeced.

     

    If(!IsBlank(TextInputAddID.Text) && !IsBlank( TextInputAddLocation.Text) && !IsBlank(TextInputAddRestriction.Text), DisplayMode.Edit, DisplayMode.Disabled).

     

    Thanks,

  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @fdenman ,

    Do you mean that you want to enable the Icon when all Text fields are not empty?

     

    According to your scenario, if one of these Text field is not empty, the rest of them are empty, how do you want to do for this condition? Disable the Icon or enable it?

     

    If you want to enable the Icon when all Text fields are not empty, please try the following formula:

    Set the DisplayMode property of the Icon to following:

    If(
     IsBlank(TextInputAddID.Text) || IsBlank( TextInputAddLocation.Text) || IsBlank(TextInputAddRestriction.Text),
     DisplayMode.Disabled,
     DisplayMode.Edit
    )

    or

    If(
     !IsBlank(TextInputAddID.Text) && !IsBlank( TextInputAddLocation.Text) && !IsBlank(TextInputAddRestriction.Text),
     DisplayMode.Edit,
     DisplayMode.Disabled
    )

     

    In other words, you must determine a DisplayMode "State" for the Icon when one of these Text field is not empty, the rest of them are empty. The following two conditions that you mentioned face some conflict error:

    1. disable an icon only when all TextInput fields are blank, otherwise enable it.
    2. want the icon to be enabled when all fields have text in them

    Above two filter condition could not be combined together into your If formula, you must choose one of them. e.g. "want the icon to be enabled when all fields have text in them"

     

    Best regards,

  • fdenman Profile Picture
    12 on at

    Thanks Everyone for such a quick response.   @wang123 and @v-xida-msft  both your solutions worked.  Thanks again!

  • fdenman Profile Picture
    12 on at

    @v-xida-msftI want the icon to be enabled only when all textinput fields are not empty.  The second option worked as I had expected.  Thank you for your solution.

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 519

#2
WarrenBelz Profile Picture

WarrenBelz 439 Most Valuable Professional

#3
Vish WR Profile Picture

Vish WR 433

Last 30 days Overall leaderboard