cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
techtudoor
Resolver I
Resolver I

Clear multiselection ComboBox

I have a PowerApps that has 2 ComboBoxes. The first ComboBox only allows for 1 selection. If "Option1" is selected, a control is displayed, if "Option2" is selected a ComboBox that allows multiple selections is displayed. I need to have this second ComboBox cleared out if the first ComboBox selection is changed (single option). I know that the below works to clear out a Single selection ComboBox. (DefaultSelectedItem). DataCardValue13 is the single option ComboBox. This code is in the DefaultSelectedItems for DataCardValue14 (Allow multiple selection combobox)

 

If(
    "Option2" <> DataCardValue13.Selected.Value,
    {
        '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
        Value: ""
            },
    Parent.Default
)

 

 

I am uncertain as to how modify this code to clear out DataCardValue14 (Allow multiple selection combobox). What am I missing? I know that multiple selection comboboxes are stored as a table, just not sure how to reset..

 

Thank you in advance

2 ACCEPTED SOLUTIONS

Accepted Solutions
Pstork1
Dual Super User III
Dual Super User III

The easiest way to clear the second combobox is to just use Reset().  That will clear all the current selections and reset the combobox to its default selection.

Reset(DataCardValue14);

 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

RandyHayes
Super User
Super User

@techtudoor 

In the OnChange action of the first combobox, place a Reset(otherComboBox)

This will reset the control back to the DefaultSelectedItems based on your new selection.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

4 REPLIES 4
Pstork1
Dual Super User III
Dual Super User III

The easiest way to clear the second combobox is to just use Reset().  That will clear all the current selections and reset the combobox to its default selection.

Reset(DataCardValue14);

 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

RandyHayes
Super User
Super User

@techtudoor 

In the OnChange action of the first combobox, place a Reset(otherComboBox)

This will reset the control back to the DefaultSelectedItems based on your new selection.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

techtudoor
Resolver I
Resolver I

@RandyHayes , @Pstork1 ,

Thank you both. I was way over thinking this. I tried reset everywhere except OnChange property. Once I used it in the OnChange (as you both suggested) everything worked. Maybe more coffee this morning. 

 

Thank you 

RandyHayes
Super User
Super User

@techtudoor 

imgEnjoyCoffee.gif

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

Top Solution Authors
Top Kudoed Authors
Users online (1,571)