web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to check if the Te...
Power Apps
Unanswered

How to check if the Text field is blank

(1) ShareShare
ReportReport
Posted on by 22
I am using the below code click button to patch only if the fields are Not blank.
But the every first time, even the field not blank, it bring notification. In the second click it works.
Could not understand, what is the reason.
 
Is there any other way to Test the blank fields, should I used the function Blank(TextBox2_1.Value)
please guide
 
Below is my code
 
If(Len(TextBox2_1.Value) = 0 || Len(TextBox2_12.Value) = 0 || Len(TextBox2_20.Value) = 0,
Notify("Cannot Save !!!  As  Form No, Model, Serial No  Fields Cannot be Blank", NotificationType.Warning,3000),
Patch(
TableMachRemarks,
Categories:
I have the same question (0)
  • Suggested answer
    CU04081342-0 Profile Picture
    6 on at
    Hi, 
     
    yes you are right, you should use the Blank() function or compare the string to the built-in IsBlank() function. 
     
    If(TextInput1.Text=Blank() Or IsBlank(TextInput1.Text); true ; false )
  • Verified answer
    WarrenBelz Profile Picture
    153,040 Most Valuable Professional on at
    Len() is actually the better option is it covers both Blank(() and Empty() - a text box can contain an empty string. I think your issue is actually the modern control - to test this, try Classic Text Inputs and see if that works.

    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)     Visit my blog Practical Power Apps    Buy me a coffee

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard