cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SachS
Helper II
Helper II

Filter a gallery by drop down or combo box, but with an 'ALL' option

I have a simple app with a gallery showing a list of assets (base is a SP list using the default 'assets' template). One of the columns in the list is 'AssetType' (=Smartphone, Laptop, Printer, Accessory).

 

I would like to give the user the ability to filter the list by AssetType. So far, I've done the following using a combo box:

 

ComboBox items

items = Choices('Asset Manager'.'Asset type')

 

Gallery items

items = Filter('Asset Manager', 'Asset type'.Value = ComboBox3.Selected.Value)

 

This works fine, and the gallery changes based on drop down selection. But the obvious issue is that when no items is selected, the gallery too will show no items. Is there a way to either:

  • Add an 'ALL' item to the combo box so that when it's selected the gallery will show all items.
  • Or, when no item is selected in the combo box, the gallery will show all items.

Is either of those a possibility?

 

1 ACCEPTED SOLUTION

Accepted Solutions
PowerRanger
Super User
Super User

@SachS 

Use this for Gallery items

Filter(
    'Asset Manager',
    'Asset type'.Value = ComboBox3.Selected.Value || IsBlank(ComboBox3.Selected.Value)
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.




​Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item.

If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

1 REPLY 1
PowerRanger
Super User
Super User

@SachS 

Use this for Gallery items

Filter(
    'Asset Manager',
    'Asset type'.Value = ComboBox3.Selected.Value || IsBlank(ComboBox3.Selected.Value)
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.




​Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item.

If the content was useful in other ways, please consider giving it Thumbs Up.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

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