web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Using the Output of a ...
Power Apps
Answered

Using the Output of a ComboBox as a Filter in a Gallery

(0) ShareShare
ReportReport
Posted on by 4

Hi All,

 

I need some assistance using a ComboBox as a filter for a Gallery, the context behind this app is a seat reserveration app for a corporate office.

 

At the moment I have a ComboBox that displays all floors of the building, it crawls a SharePoint list and uniquely displays each floor. The function looks like this:

 

Distinct(Filter(Rooms, Building = Dropdown2.Selected.Result && Availability.Value = "not restricted"), 'Floor Number')

 

 

What I need now is a way to use the selected item/items as a filter in a gallery to only display Rows of the list corresponding to the options selected in the ComboBox. I saw this StackOverflow answer and tried to adapt it to my code, but looks like it will display all entries in the list if a ComboBox Item matches any entry in the list.

 

Filter(Rooms, Building = Dropdown2.Selected.Result && Availability.Value = "not restricted" && Sum(ForAll(ComboBox4_1.SelectedItems, If(ThisRecord.Result in Rooms.'Floor Number', 1, 0)), Value) > 0)

 

 

In essence I need this input:

Screenshot 2021-07-22 at 13.58.26.png

 

To only display any room starting with 3xx, but it doesn't, this is the output:

Screenshot 2021-07-22 at 13.58.36.png

 

Because in the list, only rooms starting with 3XX have a "Floor Number" of 3:

Screenshot 2021-07-22 at 13.58.52.png

 

Thanks for any help, I really appreciate it 🙂

Categories:
I have the same question (0)
  • Verified answer
    KvB1 Profile Picture
    1,596 on at
    Filter(Rooms, Building = Dropdown2.Selected.Result && Availability.Value = "not restricted" && Floor Number in ComboBox4_1.SelectedItems)

    Would this work?

  • Mitanshu Profile Picture
    1,658 Moderator on at

    What happens if in your Gallery, the Items property is set as: 

    Filter('Rooms', 'Floor Number' in ComboBox4_1.SelectedItems.'Floor Number')

    This may give delegation warning though...

  • Pykee Profile Picture
    4 on at

    Man, sometimes the most simple solutions are the answer, thanks so much! That is exactly what I was looking for!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 993

#2
Valantis Profile Picture

Valantis 675

#3
11manish Profile Picture

11manish 545

Last 30 days Overall leaderboard