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

Combo box disable/enable

Hi Guys,
Does anyone know how to execute the formula on this I have 5 combo box If all combo boxes are empty/Find Items the button will still disabled until item selected
combobox.PNG

3 ACCEPTED SOLUTIONS

Accepted Solutions
Dual Super User
Dual Super User

Re: Combo box disable/enable

@Big_S 

 

You can update the DisplayMode property of your button as:
 
If(CountRows(ComboBox1.SelectedItems) > 0 && CountRows(ComboBox2.SelectedItems) > 0 && CountRows(ComboBox3.SelectedItems) > 0 && CountRows(ComboBox1_1.SelectedItems) > 0 && CountRows(ComboBox2_1.SelectedItems) > 0, Edit,Disabled)
MicrosoftTeams-image (163).png

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Big_S
Level: Powered On

Re: Combo box disable/enable

Hi @yashag2255 

 

IT Works, however, I have 1 textbox also with same functionalities what I did is this but it's not working where did I get wrong?
If(!IsBlank(AmountTxtInput.Text) &&If(Value(AmountTxtInput.Text) >= 1, true),Edit,Disabled) & If(CountRows(BusinessUnitComboBox.SelectedItems) > 0 && CountRows(DepartmentComboBox.SelectedItems) > 0 && CountRows(ProgramComboBox.SelectedItems) > 0 && CountRows(ProjectComboBox.SelectedItems) > 0 && CountRows(ActivityComboBox.SelectedItems) > 0, Edit,Disabled)
dropdown2.PNG

View solution in original post

Community Support Team
Community Support Team

Re: Combo box disable/enable

Hi @Big_S ,

If you want the Text Box has same functionality with your other 5 ComboBoxes, please take a try with the following workaround:

Set the DisplayMode property of the "Add Transaction" button to following formula:

If(
   (!IsBlank(AmountTxtInput.Text) && Value(AmountTxtInput.Text) >= 1) && !IsBlank(ComboBox1.Selected.Value) && !IsBlank(ComboBox2.Selected.Value) && !IsBlank(ComboBox3.Selected.Value) && !IsBlank(ComboBox4.Selected.Value) && !IsBlank(ComboBox5.Selected.Value),
    DisplayMode.Edit,
    DisplayMode.Disabled
)

Or

If(
   (!IsBlank(AmountTxtInput.Text) && Value(AmountTxtInput.Text) >= 1) && !IsEmpty(ComboBox1.SelectedItems) && !IsEmpty(ComboBox2.SelectedItems) && !IsEmpty(ComboBox3.SelectedItems) && !IsEmpty(ComboBox4.SelectedItems) && !IsEmpty(ComboBox5.SelectedItems),
    DisplayMode.Edit,
    DisplayMode.Disabled
)

 

Please take a try with above solution, check if the issue is solved. If above solution I provided is helpful in your scenario, please go ahead to click "Accept as Solution" to identify this thread has been solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

8 REPLIES 8
Dual Super User
Dual Super User

Re: Combo box disable/enable

@Big_S 

 

You can update the DisplayMode property of your button as:
 
If(CountRows(ComboBox1.SelectedItems) > 0 && CountRows(ComboBox2.SelectedItems) > 0 && CountRows(ComboBox3.SelectedItems) > 0 && CountRows(ComboBox1_1.SelectedItems) > 0 && CountRows(ComboBox2_1.SelectedItems) > 0, Edit,Disabled)
MicrosoftTeams-image (163).png

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Big_S
Level: Powered On

Re: Combo box disable/enable

Hi @yashag2255 

 

IT Works, however, I have 1 textbox also with same functionalities what I did is this but it's not working where did I get wrong?
If(!IsBlank(AmountTxtInput.Text) &&If(Value(AmountTxtInput.Text) >= 1, true),Edit,Disabled) & If(CountRows(BusinessUnitComboBox.SelectedItems) > 0 && CountRows(DepartmentComboBox.SelectedItems) > 0 && CountRows(ProgramComboBox.SelectedItems) > 0 && CountRows(ProjectComboBox.SelectedItems) > 0 && CountRows(ActivityComboBox.SelectedItems) > 0, Edit,Disabled)
dropdown2.PNG

View solution in original post

Dual Super User
Dual Super User

Re: Combo box disable/enable

@Big_S 

 

Instead of using two if loops you can combine this into one loop as:

If(!IsBlank(AmountTxtInput.Text) &&If(Value(AmountTxtInput.Text) >= 1 && CountRows(BusinessUnitComboBox.SelectedItems) > 0 && CountRows(DepartmentComboBox.SelectedItems) > 0 && CountRows(ProgramComboBox.SelectedItems) > 0 && CountRows(ProjectComboBox.SelectedItems) > 0 && CountRows(ActivityComboBox.SelectedItems) > 0, Edit,Disabled)
Hope this Helps!
 
Community Support Team
Community Support Team

Re: Combo box disable/enable

Hi @Big_S ,

Do you want to disable the "Add Transaction" button within your app until all ComboBox have one option selected?

 

I have made a test on my side, please take a try with the following workaround:

Set the DisplayMode property of the "Add Transaction" button to following formula:

If(
   !IsBlank(ComboBox1.Selected.Value) && !IsBlank(ComboBox2.Selected.Value) && !IsBlank(ComboBox3.Selected.Value) && !IsBlank(ComboBox4.Selected.Value) && !IsBlank(ComboBox5.Selected.Value),
    DisplayMode.Edit,
    DisplayMode.Disabled
)

Or

If(
   !IsEmpty(ComboBox1.SelectedItems) && !IsEmpty(ComboBox2.SelectedItems) && !IsEmpty(ComboBox3.SelectedItems) && !IsEmpty(ComboBox4.SelectedItems) && !IsEmpty(ComboBox5.SelectedItems),
    DisplayMode.Edit,
    DisplayMode.Disabled
)

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Big_S
Level: Powered On

Re: Combo box disable/enable

Hi @yashag2255 

I got errors like Unexpected characters. The formula contains 'ParenClose' where 'Eof' is expected.
Invalid number of arguments: received 1, expected 2 or more.


Big_S
Level: Powered On

Re: Combo box disable/enable

Hi @yashag2255 

this is working
If(
!IsEmpty(BusinessUnitComboBox.SelectedItems) && !IsEmpty(DepartmentComboBox.SelectedItems) && !IsEmpty(ProgramComboBox.SelectedItems) && !IsEmpty(ProjectComboBox.SelectedItems) && !IsEmpty(ActivityComboBox.SelectedItems),
DisplayMode.Edit,
DisplayMode.Disabled
)

I wanted also to include the text input if no value the button will disable
dropdown2.PNG

Community Support Team
Community Support Team

Re: Combo box disable/enable

Hi @Big_S ,

If you want the Text Box has same functionality with your other 5 ComboBoxes, please take a try with the following workaround:

Set the DisplayMode property of the "Add Transaction" button to following formula:

If(
   (!IsBlank(AmountTxtInput.Text) && Value(AmountTxtInput.Text) >= 1) && !IsBlank(ComboBox1.Selected.Value) && !IsBlank(ComboBox2.Selected.Value) && !IsBlank(ComboBox3.Selected.Value) && !IsBlank(ComboBox4.Selected.Value) && !IsBlank(ComboBox5.Selected.Value),
    DisplayMode.Edit,
    DisplayMode.Disabled
)

Or

If(
   (!IsBlank(AmountTxtInput.Text) && Value(AmountTxtInput.Text) >= 1) && !IsEmpty(ComboBox1.SelectedItems) && !IsEmpty(ComboBox2.SelectedItems) && !IsEmpty(ComboBox3.SelectedItems) && !IsEmpty(ComboBox4.SelectedItems) && !IsEmpty(ComboBox5.SelectedItems),
    DisplayMode.Edit,
    DisplayMode.Disabled
)

 

Please take a try with above solution, check if the issue is solved. If above solution I provided is helpful in your scenario, please go ahead to click "Accept as Solution" to identify this thread has been solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Big_S
Level: Powered On

Re: Combo box disable/enable

@v-xida-msft 

 

WOWOWOW! it works!!!! THANK YOU SO MUCH!!! ❤️

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (3,632)