Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
Answered

Disable a button based on a dropdown value & dropdown on change event

(1) ShareShare
ReportReport
Posted on by 6
Hello PowerApps Community
I'd like to disable a button based on the value of a dropdown.  The dropdown (drpdProperty_Type) is fed by a table PropertyTable 
 
I have the button's DisplayMode property connected to a formula:
If(drpdProperty_Type.Selected.Property_Type = "Select......" || varOCPropType = "Select......", DisplayMode.Disabled,DisplayMode.Edit)
 
I have a variable varOCPropType connected to the On Change property of drpdProperty_Type as 
Set(varOCPropType,drpdProperty_Type.Selected.Property_Type) which evaluates to a text datatype, as does drpdProperty_Type.Selected.Property_Type = "Select......"
 
The drpdProperty_Type items are set to PropertyTable.
 
When I inspect button DisplayMode,  the IF expression still evaluates to false even when datatype text values are the same and I'm expecting the expression to be evaluated as true.
 
Could you please tell me why this doesn't evaluate to true?
  • CH-11102210-0 Profile Picture
    6 on at
    Disable a button based on a dropdown value & dropdown on change event
    Thank you so much WarrenBelz! 
    As another test,  I created another dropdown with more simple items: 
    ["Item 1", "Item 2", "Item 3"] and the disabled mode evaluated as true. 
    This tells me my values from the dropdown are at fault, so I'll need to revisit those.
    Len(ComboBox.Selected.Property_Type) = 0
    makes perfect sense and seems much more robust. I will give it try! Cheers!
  • Verified answer
    WarrenBelz Profile Picture
    148,556 Most Valuable Professional on at
    Disable a button based on a dropdown value & dropdown on change event
    Firstly Modern Controls are still in Preview and really should not be used in Production apps. I notice that nothing is selected in your screenshot, so you would need to make the DefaultSelectedItems 
    {Value: "Select......"}

    If you had a Classic Combo Box, you could set the InputTextPlaceHolder to "Select......" and then
    If(
       Len(ComboBox.Selected.Property_Type) = 0,
       DisplayMode,Disabled,
       DisplayMode.Edit
    )
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)     Visit my blog Practical Power Apps    Buy me a coffee

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1