cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Courtney
Helper V
Helper V

Disable Button if drop down and text are empty

Hi Everyone, 

I have a button that I would like to remain disabled unless a text entry box and drop down have been selected. 

 

So far I have entered the below formula for the buttons (DisplayMode) but it does not seem to be working. 

 

If(
!IsBlank(SerialEntry_ETD_Input.Text) && If(Verification_ETD_Dropdown.Selected.Value="-") && If(Filters_ETD_Dropdown.Selected.Value="-"),
DisplayMode.Edit,
DisplayMode.Disabled)

 

Any ideas?

1 ACCEPTED SOLUTION

Accepted Solutions

ohhhhhh! Yes ok, this is showing if any of those doesn't happen, but you want the opposite, this will do the trick:

 

If(
   (Len(SerialEntry_ETD_Input.Text)=0)
   ||
   (Verification_ETD_Dropdown.Selected.Value="-")
   ||
   (Filters_ETD_Dropdown.Selected.Value="-"),
   DisplayMode.Disabled,
   DisplayMode.Edit
)

 

@iAm_ManCat


Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


View solution in original post

7 REPLIES 7
eka24
Super User III
Super User III

Try

If(IsBlank(SerialEntry_ETD_Input.Text) && Verification_ETD_Dropdown.Selected.Value="") && Filters_ETD_Dropdown.Selected.Value=""),DisplayMode.Disabled,DisplayMode.Edit)

 

Meaning all 3 should have value before button will be Edit

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Hi, thanks for getting back to me. 

That does not seem to work. The dropdown boxes have 3 options:

 

"-"

"Yes"

"No" 

 

I need the button to be disabled unless the Serial Entry has text and the dropdown boxes have anything selected apart from "-" which is the default. 

If(IsBlank(SerialEntry_ETD_Input.Text) Or Verification_ETD_Dropdown.Selected.Value="-") Or Filters_ETD_Dropdown.Selected.Value="-"),DisplayMode.Disabled,DisplayMode.Edit)

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

 

Hi, Still no luck. 

error.png

Hi,

 

This IsBlank is a bit finicky, I usually use Len(textbox.Text)=0

 

If(
   (Len(SerialEntry_ETD_Input.Text)=0)
   &&
   (Verification_ETD_Dropdown.Selected.Value="-")
   &&
   (Filters_ETD_Dropdown.Selected.Value="-"),
   DisplayMode.Disabled,
   DisplayMode.Edit
)

 

Could you try that and let me know?

 

Thanks,

Sancho

@iAm_ManCat


Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


Thanks Sancho! I tried this but it's still not working. 

 

It seems to remove the error but the button should remain disabled until the entry has text and both dropdowns have selected an option other than "-"

Courtney

 

 

ohhhhhh! Yes ok, this is showing if any of those doesn't happen, but you want the opposite, this will do the trick:

 

If(
   (Len(SerialEntry_ETD_Input.Text)=0)
   ||
   (Verification_ETD_Dropdown.Selected.Value="-")
   ||
   (Filters_ETD_Dropdown.Selected.Value="-"),
   DisplayMode.Disabled,
   DisplayMode.Edit
)

 

@iAm_ManCat


Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (3,330)