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

PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!


Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (67,830)