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
Super User

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


Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (4,303)