cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jonathanO
Level: Powered On

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
Level 10

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,545)