web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Disable button based o...
Power Apps
Answered

Disable button based on dropdown

(0) ShareShare
ReportReport
Posted on by 58

Hi

 

I am trying to do something as simple as setting a button displaymode to disabled, if a certain value is selected in a dropdown field.

This is what I am trying:

 

If(DataCardValue9.Selected.Value = "[value]", DisplayMode.Disabled, DisplayMode.Edit)

 

But for some reason it won't work. It seems the "=" is the issue, but I dont get why?

 

Any ideas?

 

 

Categories:
  • CU-18081211-6 Profile Picture
    9,272 Moderator on at

    Hi @MichaelBL ,

    Do you have number values in dropdown items ?

    Can you show us here the error ?

     

  • Verified answer
    MichaelBL Profile Picture
    58 on at

    Hi @gabibalaban ,

     

    I am not using number values. The dropdown contains text values. 

     

    The error looks like this:

     

    MichaelBL_0-1607163569075.png

     

    But how does it make sense, that you have to use numbers, if you make a dropdown that does uses text values instead?

     

    EDIT:
    I was able to figure it out. The solution was this:
    If(IsMatch(Concat(DataCardValue9.SelectedItems, Value & ""), "[DropDownValue]"), DisplayMode.Disabled, DisplayMode.Edit)

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 432 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard