cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
johnjohn123
Super User
Super User

Disable a Button if the user did not select any value inside the dropdown

I have a dropdown + button, now i want to enable the button only if the user select a value inside the dropdown, so inside the Button's Display mode i added this formula:-

 

do1.png

 

but the button will always be disabled.. any advice?

5 REPLIES 5
Anonymous
Not applicable

Hi @johnjohn123 ,

 

I tried to recreate your use-case and here is a solution that seems to work based on what you have mentioned -

  1. Insert a combobox instead of a dropdown (Combobox1, in my example. If you want to have only a single value selected from a user, you can turn "Allow multiple selection" off
  2. The Button's DisplayMode can be set to this -

 

If(ComboBox1.Selected.Value = Blank(),Disabled,Edit)

 

  • When there is no value selected, the button will be disabledsivaecl_0-1631856074573.png

     

  • When a value is selected, the button will go into Edit modesivaecl_1-1631856117969.png

Please click Accept as solution if my post helped you solve your issue. If this was useful in some way, please give a  Thumbs Up.

rampprakash
Super User
Super User

Hello @johnjohn123,

 

I have created a Drop Down with Item as ["","1","2"]

rampprakash_0-1631858115360.png

 

in Display Mode of button

 

rampprakash_1-1631858160689.png

 

If(IsBlank(dropDownValue.Selected.Value),DisplayMode.Disabled,DisplayMode.Edit)

 

Check if the Drop Down Value is null, if null Disabled else Edit

 

Please mark as Answer if it is helpful and provide Kudos


Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA
Blog : https://microsoftcrmtechie.blogspot.com

 

Ethan_R
Super User
Super User

Hi @johnjohn123 ,

 

Use this on button property 'DisplayMode' insert this formula

If(CountRows(ComboBox.SelectedItems) = 0, DisplayMode.Disabled, DisplayMode.Edit)

 

Hope this helps.

@Ethan_Ri am using dropdpwn not combobox..

Hi @johnjohn123 ,

No problem,

Use this then,

If(IsBlank(Dropdown1.Selected), DisplayMode.Disabled, DisplayMode.Edit)

 

For this, you will require 'AllowEmptySelection' property of Dropdown set as true

 

Hope this helps

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (2,535)