cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
SeanHenderson
Level: Powered On

Reset Combo Box After Clearing Selections

I am trying to disable an email button if a name is not selected. So I made an IsBlank forumla for the button as follows:

If(IsBlank(EngSelect), DisplayMode.Disabled, DisplayMode.Edit) where EngSelect is the name of the combo box. This works just fine.

The problem is that if someone selects the combo box, but either does pick anything, or picks a name but then removes it, the value in the combo box doesn't revert to blank, it leaves it as a value with nothing in it as shown:

image.png

I tried adding to the DisplayMode formula on the button as follows:

If(IsBlank(EngSelect), DisplayMode.Disabled, EngSelect.Selected.displayName = "", DisplayMode.Disabled, DisplayMode.Edit)

I believe the problem is that it is checking if the displayName value in the data source is blank. 

 

Any ideas on how I can get this working?

1 ACCEPTED SOLUTION

Accepted Solutions
RezaDorrani
Level 10

Re: Reset Combo Box After Clearing Selections

Hi @SeanHenderson 

 

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

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

2 REPLIES 2
RezaDorrani
Level 10

Re: Reset Combo Box After Clearing Selections

Hi @SeanHenderson 

 

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

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

SeanHenderson
Level: Powered On

Re: Reset Combo Box After Clearing Selections

Thank you so much! Worked perfectly.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 83 members 4,536 guests
Please welcome our newest community members: