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

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

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,636)