cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver II
Resolver II

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
Highlighted
Community Support
Community Support

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
Highlighted
Community Support
Community Support

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

Highlighted
Resolver II
Resolver II

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

Mona,

Thanks for the try. 

 

Thanks,

Gene

 

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (4,208)