Showing results for 
Search instead for 
Did you mean: 
Helper III
Helper III

Strange error in simple if statement

I am banging my head around a tiny equation which gives 'blue underline' error.


The equation is;

If(IsEmpty(Value2.Text), DisplayMode.Disabled, DisplayMode.Edit)

same as;

If(IsEmpty(Value2), DisplayMode.Disabled, DisplayMode.Edit)


This gives me "Expecting a true or false value. The current value may cause unexpected behavior"


Plz tell me I am not going mad.


Accepted Solutions

Figured it out.

The equations I have been trying to put in was under 'visible'.

Instead of that it should go to 'displaymode'.

Now its working.

View solution in original post

Not applicable

Hi Pat_Wickramage

Perhaps try "IsBlank" instead of "IsEmpty"? 

Else i cannot spot anything either..

Tried it already. Still the same error.

This is fustrating 🙂

Not applicable

Hi Pat_Wickramage


I think the issue lies within 'Value2' rather than the formula. 

Just tested this myself with a textinput field that is called 'Value2' and both statements you listed work without error. 




What exactly does Value2 refer to - a variable?

In that case you may need to change the statement to say  If (Variable2 = "", DisplayMode.Disabled, DisplayMode.Edit)

Figured it out.

The equations I have been trying to put in was under 'visible'.

Instead of that it should go to 'displaymode'.

Now its working.

Not applicable

It would be nice if MS put a suggestion linking Display Mode and Visibility in the Help notes/field as this is (apparently) something many of us have [still] done by mistake.

Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.


New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (1,770)