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 / How to check if a Text...
Power Apps
Answered

How to check if a Text Input Control is empty? / Check if Text Input Control is empty fails.

(0) ShareShare
ReportReport
Posted on by 5

I have several input control fields, two text inputs and two dropdowns. The text inputs are called NamePicker and PricePicker and the dropdowns are called CategoryPicker and ColorPicker. Below that I have a button that contains the following if statement:

(SPProductList is the name of my SharePoint connector) 

 

 

UpdateContext({error:""});;
If(
 NamePicker in SPProductList.'Name (Title)';
 UpdateContext({error: "nameexists"});
 IsEmpty(NamePicker.Text);
 UpdateContext({error: "emptyname"});
 IsEmpty(CategoryPicker.SelectedText.Value);
 UpdateContext({error: "emptycategory"});
 IsEmpty(PricePicker.Text);
 UpdateContext({error: "emptyprice"});
 IsEmpty(ColorPicker.SelectedText.Value);
 UpdateContext({error: "emptycolor"});
 error="";
 UpdateContext({SaveAttempt: true})
)

 

 

This is the layout:

image.pngAs you can see, the text input fields contain only hint text, which I don't check for. Nevertheless, the button continues with UpdateContext({SaveAttempt: true}), which I don't want in that case. When I added a label with the visible property "IsEmpty(NamePicker)", it remained invisible even though it should be visible.

Is there something I'm missing or doing wrong here? Any advice is much appreciated!

Categories:
I have the same question (0)
  • Verified answer
    shoog Profile Picture
    2,164 on at

    Replacing IsEmpty with IsBlank should fix this.

    IsEmpty is used to check for empty tables, IsBlank is used for checking text.

  • Anonymous123456 Profile Picture
    5 on at

    Wow, thank you very much, that solved it! No idea why I even used IsEmpty in the first place, because I used IsBlank before in other cases xD

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 519 Most Valuable Professional

#2
11manish Profile Picture

11manish 489

#3
Haque Profile Picture

Haque 327

Last 30 days Overall leaderboard