cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
geneZebra
Level 8

select all option in combo box and possible broken select items

I am using a comboBox to as a filter to a Gallery which works fine but the issue I cannot find a way to de-select an entry. I have an item called "All" in by comboBox to select all entries but if a user selects another entry on the list, "All" is not de-selected. This causes the other selections not to take effect unless they remove "All" in the selected list. 

I was able to get some succes by basing the selected items on a collection in the DefaultSelectedItem property  that is updated on the OnChange property (see code below). It seems I have to call reset in order for the selected items to reflect the values in my collection. I now have two problems to solve:

1) If I call reset in OnChange, the drop down of the combox does not stay visible so the user cannot see what items are selected. The selected items are updated but if/when the user clicks to show the  dropdown, selected items are highlited eventhough they are shown as selected.

2) There is a possible bug in the combox since if the user then clicks on entries which are already in the selected items of the dropdown (and not highlited yet as mentioned above), they get added a second time to the selected items of the dropdown. The UI will show the original selected items then the newly clicked items from the drop down list.

 

If anyone has a clean way of supporting a "Select All" function in a comboBox that does entail adding an additional control, please share. All example I see on line use another control to help manage the comboBox. My UI is pretty crowded and I am usign a mobile view so I don't have a lot of space. I simply wanted a multi-selction filter that include and all function.

 Button.OnSelect:

ClearCollect(_StatusTypes, ["All", "Requested", "Approved", "Denied"]);
ClearCollect(_coStatusFilterSelectedItems, First(_StatusTypes));


comboBoxTest.OnChange :

ClearCollect(_coStatusFilterSelectedItems, comboBoxTest.SelectedItems.Value);

If (CountRows(_coStatusFilterSelectedItems)=0,
    ClearCollect(_coStatusFilterSelectedItems, First(_StatusTypes).Value);
    Reset(comboBoxTest)

, (CountRows(_coStatusFilterSelectedItems) >1) && ("All" in comboBoxTest.SelectedItems.Value),
      ClearCollect(_coStatusFilterSelectedItems, _StatusTypes.Value);
      RemoveIf(_coStatusFilterSelectedItems, "All" in Value);
      Reset(comboBoxTest)

);

 

comboBoxTest.items:

_StatusTypes.Value

 

comboBoxTest.DefaultSelectedItems

_coStatusFilterSelectedItems



1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: select all option in combo box and possible broken select items

Hi @geneZebra ,

 

After some testing and research, I personally think it might be not possible to achieve what you want for the selecting all option in combo box actions so far. Hope others who have the similar need could share their resolutions, or you could raise an idea in below forum so that in further release, there could be such feature set for combo box control:

https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

 

Regards,

Mona

Community Support Team _ Mona Li
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

2 REPLIES 2
Community Support Team
Community Support Team

Re: select all option in combo box and possible broken select items

Hi @geneZebra ,

 

After some testing and research, I personally think it might be not possible to achieve what you want for the selecting all option in combo box actions so far. Hope others who have the similar need could share their resolutions, or you could raise an idea in below forum so that in further release, there could be such feature set for combo box control:

https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

 

Regards,

Mona

Community Support Team _ Mona Li
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

geneZebra
Level 8

Re: select all option in combo box and possible broken select items

Mona,

Thanks for the try. 

 

Thanks,

Gene

 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,091)