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 / If Gallery TextInput I...
Power Apps
Answered

If Gallery TextInput IsBlank

(0) ShareShare
ReportReport
Posted on by 5,345 Moderator

I have Gallery1. One of the fields in the gallery is RunDateFld1.Text.

I am feeding Gallery1 with a variable from another gallery.

I have a cover label ( Label1.Text ), that contains a message to the user.

Goal:
If RunDateFld1.Text IsBlank then Label1.Text visible equals true else false.

I've tried ten ways from Sunday and can't get the formula correct.

I have Something like the following in the Label1.Text visible property, but it's not working as desired.

What am I missing?

Label1.Text visible property -
     If(IsBlank(RunDateFld.Text),true,false)

Also, If I want to base the visibility on multiple fields in multiple galleries how would the formulation look?

Goal, If all fields are blank -

Label1.Text visible property -
      If(IsBlank(RunDateFld.Text),true,
         IsBlank(RunDateFld2.Text),true,
         IsBlank(RunDateFld3.Text),true,false)

Categories:
  • Verified answer
    AARON_C Profile Picture
    2,235 Most Valuable Professional on at

    Hi @Phineas,

     

    What you stated in your goal was, if text input control is blank, show label, else hide the label. What you have in your Visible property of your label works to what you stated in your goal, yet you are saying it is not working as desired.

     

    To shorten this, you can use this instead: IsBlank(TextInput1.Text) as the Visible property is expecting a true or false result, there is no need for the IF statement.

     

    If you want to display the label if multiple text inputs are blank, then use: 

    IsBlank(TextInput1.Text) && 
    IsBlank(TextInput2.Text) &&
    IsBlank(TextInput3.Text)

    on the Visible property of the label.

     

    Please tick Accept as solution if the answer is useful.

    Thanks,

    @AARON_C 

  • Phineas Profile Picture
    5,345 Moderator on at

    I agree, and yet...

    Here it is, not responding to the formula as desired.

    The screenshot below shows the focus on the cover Label and the formula in it's Visible property.

    The 'ContinuousGalleryRunDateFld' has content, and yet - the cover Label still appears.

    Phineas_0-1697590384967.png

     

  • AARON_C Profile Picture
    2,235 Most Valuable Professional on at

    @Phineas 

     

    When you click in the Fx box where your code is on the Visible property of the label, does a coloured border appear around the Run Date text input?

     

    This is an example I have created. As you can see, when clicking in the Fx box, the coloured border apperas around my text input control. When TextInput9 is blank, a number appears in my label.

    AARON_C_0-1697591849491.png

     

  • Phineas Profile Picture
    5,345 Moderator on at

    Yes. Tried to  use 'Snip and Sketch' to show, but once I click that tab to copy the screen the green boarder disappears.

    But I have confirmed that when I click into the Label1 formula a green boarder appears around the 'Run Date' data field.
    Phineas_0-1697592854419.png
    And, this is why I referenced the 'if all' run date fields are blank, just in case something like this happens.

    I tried the multiple formula, without success - 

    IsBlank(TextInput1.Text) && 
    IsBlank(TextInput2.Text) &&
    IsBlank(TextInput3.Text)

    Phineas_1-1697593201468.png

  • AARON_C Profile Picture
    2,235 Most Valuable Professional on at

    @Phineas 

     

    I am not sure why your code/the code I said is not working. My suggestion now is to create a new gallery containing a text input and label as a test. If it works you should be able to use that same logic and apply it to your current set up.

     

    Please tick Accept as solution if the answer is useful.

    Thanks,

    @AARON_C 

  • Phineas Profile Picture
    5,345 Moderator on at

    More testing reveals an interesting outcome.

    I have another gallery with the same set-up. If the gallery Label IsBlank the cover label visibility is 'true' else 'false'.

    For this gallery visibility formula is points to a Label for content, and the cover Label has -     If(IsBlank(Label.Text),true,false) in it. This is working fine.

    For the gallery where the visibility function is not working, the content field in question is a TextInput.

    I placed a Label in that same gallery and change the cover label visibility formula to look to the new label (rather than the TextInput) for the content with the formula - 
       If(IsBlank(Label3.Text),true,false) - With this change the visibility function works fine.

    I deduce the issue is with referencing the content of a TextInput field rather than a Label.

    The Default property of the TextInput is a ThisItem.Whatever, as it is auto-populating data from a collection.

    As a result, apparently, the formula is not seeing the TextInput as 'empty'; Consequently, the cover Label always appears.

    Is there a way to write the formula, or set the TextInput so that the formula sees the TextInput field as empty?


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 221 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 120

Last 30 days Overall leaderboard