Showing results for 
Search instead for 
Did you mean: 
Advocate II
Advocate II

BUG: Button DisplayMode not recognizing boolean variable

I have a button that has a DisplayMode property set to only be "Edit" if a context variable is NOT 3:









The content of EstimateStatus is 2.  This is demonstrated by looking at the Text property of the EstimateStatus label selected below.  You will see is "Open" because the value of EstimateStatus variable is 2. So PowerApps recognized the EstimateStatus is 2:




I also set a label text property to be the EstimateStatus variable and you'll see it also shows 2.


Inkedpowerapps_variable_content_LI (2).jpg



So if the EstimateStatus is 2 and the button should only be clickable if the EstimateStatus is 3, why is the button clickable?



Memorable Member
Memorable Member

Re: BUG: Button DisplayMode not recognizing boolean variable

What happens if you switch those around and just say:


If(EstimateStatus = 3, DisplayMode.Edit, DisplayMode.Disabled)




I think I misread: "I have a button that has a DisplayMode property set to only be "Edit" if a context variable is NOT 3:"


If you want it to be able to be edited when DisplayMode is not 3 then checking to see if it is 3 would mean you disable it, switch my code around.


If(EstimateStatus = 3, DisplayMode.Disabled, DisplayMode.Edit)

That means if it's ever 3 it's disabled, anything else for a value it's clickable.

Helpful resources


Microsoft Ignite

This will be a conference that you do not want to miss!


New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications


Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (5,077)