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 / Enable a button based ...
Power Apps
Answered

Enable a button based on a combo box selection

(0) ShareShare
ReportReport
Posted on by 21

Hi all,

 

I'm a beginner on this and might be very simple. I need to enable/disable a button based on a selection from a combo box. This is what I'm writing:

 

If("Capex" in DataCardValue17_1.SelectedItems.Value,DisplayMode.Edit,DisplayMode.Disabled)
 
Maybe because my combo box is based on a column with Choices, I'm getting this message highlighted on "Capex" - Can't convert this data type. Power Apps can't convert this Text to an Optionsetvalue.
 
Any workaround?
Categories:
  • Verified answer
    Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @jda2005py - based on your description it sounds like you're data source is Dataverse.

     

    Assuming you want to enable the button if Capex is selected.

     

    For a Local Choice, apply the below to the DisplayMode property of your Button control:

     

    If(
     'Your Local Choice Field (Your Table Plural Name)'.Capex in DataCardValue5.SelectedItems,
     DisplayMode.Edit,
     DisplayMode.Disabled
    )

     

    For a Global Choice, use:

     

    If(
     'Your Global Choice Field'.Capex in DataCardValue5.SelectedItems,
     DisplayMode.Edit,
     DisplayMode.Disabled
    )

     

    Notes:

     

    To identify the "Plural Name" for your table, open your table in Dataverse and select the properties window:

     

    Amik_0-1710353874104.png

     

    Another simpler option is to simply add an Edit Form control into your screen, add the DataCard for your Choice field into your Form. Then if you select the Items property of the automatically generated ComboBox inside the DataCard, you will see the syntax you need.

  • jda2005py Profile Picture
    21 on at

    Thank you very very much, it worked!

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 345 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 312

#3
Mohsin Ali Profile Picture

Mohsin Ali 252

Last 30 days Overall leaderboard