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

Notifications

Announcements

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,650 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard