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

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (27,160)