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

Galley Filter Based on ComboBox Selected Item

I have a gallery that pulls information from a SharePoint site.

 

I would like to filter this gallery based on a combo box drop-down selected value which will filter the gallery based on the selected location. Please see the image attached. 

 

Untitled-1.jpg

 
Thanks in advance for the support! 

1 ACCEPTED SOLUTION

Accepted Solutions

I couldn't find the solution I needed but found a workaround.

 

I created a gallery for each location and made them each filter based on the second dropbox location. 

In the Visible property of each gallery I used:

 

If(
ComboBox.Selected.Value = "CSA" || ComboBox2.Selected.Value = "Staff Search Departures",
true,

 

This way if there is no selection the original gallery connected to the top filter would become visible. 

View solution in original post

5 REPLIES 5
Super User III
Super User III

Try

Filter (Datasource, Zone=Combobox1.Selected.Result)

 

Or

Filter (Datasource, Zone=Combobox1.Selected.ColumnName)

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Awesome! This works perfectly for the Location. 

 

What I would then like is for the user to filter the zone based on the location they have selected.  


For example: 

User will select Location B = Gallery will show all entries in Location B All Zones

 

User will select Zone G = Gallery will show entries in Location B Zone G only 

 

I would like the same gallery to be able to filter each Location plus zone based on the dropdown selected like a 2 level filter system and if all dropdowns are deselected it will show entries as default. 

 

If(IsEmpty(Combobox1.SelectedItems)&&IsEmpty(Combobox1.SelectedItems),
Datasource,

Filter (Datasource, Zone=Combobox1.Selected.ColumnName Or Location=Combobox2.Selected.ColumnName ))

 

Or

If(IsEmpty(Combobox1.SelectedItems)&&IsEmpty(Combobox1.SelectedItems),
Datasource,

Filter (Datasource, Zone=Combobox1.Selected.Result Or Location=Combobox2.Selected.ColumnName ))

 

If those dont work, Please show the Items on the Two comboboxes,

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Ok, I can actually explain this a little clearer now.

 

1) I would like the gallery to show all entries unfiltered when the screen becomes visible.

Screen 1.png

2) Currently, the galley will filter based on the location value selected from the combo box. This combo box (and all other combo boxes) pulls the information from the SharePoint site Choices([@apptest_1].Location) Screen 2.png

3) This works perfectly at this level of filtering with the galley filtering down based on the location selected however, I would like the entire gallery available unfiltered when no location is selected.

Screen 3.png

4) As you can see in the gallery items, the filter is applied applied based on location value. 

Screen 4.png

5) Each location (Terminal 2, Terminal 3, Terminal 4, Terminal 5 & Campus) has its own list of search areas as you can see from T2. Based on the location selected I have made each combo box visible.  

Screen 5.png

6) When any of these search areas are selected I would like the gallery to only show the results based on the locations (LocationDropDownCL_1) search area (T2DropDownCL_1/T3DropDownCL_1/T4DropDownCL_1/T5DropDownCL_1/CampusDropDownCL_1). So the gallery in the image below should only show entries from Terminal 2, Search Area CSA.

Screen 6.png

 

It sounds really straightforward and the first part works. It's just the second set of dropdowns and the unfiltered gallery when the page is first visible. 

I couldn't find the solution I needed but found a workaround.

 

I created a gallery for each location and made them each filter based on the second dropbox location. 

In the Visible property of each gallery I used:

 

If(
ComboBox.Selected.Value = "CSA" || ComboBox2.Selected.Value = "Staff Search Departures",
true,

 

This way if there is no selection the original gallery connected to the top filter would become visible. 

View solution in original post

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Top Solution Authors
Top Kudoed Authors
Users online (10,407)