cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jonathanO 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:

 

 

 

 

 

Inkedpowerapps_button_onselect_not3_LI.jpg

 

 

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:

 

InkedPowerApps_estimatestatus_LI.jpg

 

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?

 

 

1 REPLY 1
JRaasumaa 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)

 

Edit:

 

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

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

Attending MBAS? Claim your badge

Attending MBAS? Claim your badge

Whether you’re streaming the digital event live, or watching on-demand, claim your attendee badge to sport on your profile.

‘Better Together’ T-Shirt Contest – Winner Announced!

‘Better Together’ T-Shirt Contest – Winner Announced!

And the winner is...

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

‘Better Together’ Integration Forum Launch

‘Better Together’ Integration Forum Launch

We're launching a how-to forum where you can learn about how Power BI integrates with other Power Platform products.

Emergency Response & Monitoring Solution

Emergency Response & Monitoring Solution

Microsoft has created a regional government emergency response and monitoring solution that is built on Power Apps and Power BI.

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