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 / Filtering a gallery us...
Power Apps
Answered

Filtering a gallery using a dropdown

(1) ShareShare
ReportReport
Posted on by

Good Monday, 

I want to add a filter this gallery based upon the floor levels using a dropdown as I have another filter in the gallery that only displays rooms from "RS_KS11100" on the roomsgallery items

 

The floors are labeled in the room names by the number at the end of "RS_11100_X"

 

for example,

RS_KS11100_1 is on the first floor

RS_KS11100_2 is on the second floor

then it goes up to the fifth floor

 

Screenshot 2024-07-15 083339.png

 

this is what it looks like right now

Categories:
I have the same question (0)
  • fhamm Profile Picture
    on at

    Perhaps you could try to set a variable OnChange of the dropdown that you can refer to in your filter code.

     

    First, you'll either want to set the default of the dropdown to something that isn't a floor number (like "select floor" or something) OR set your floor variable to the initially shown value (in this case, 1) on App Start.

     

    OnChange of dropdown:

    Set(varFloor, "RS_KS11100_"&Text(Dropdown1.Selected.Value))

     

    Then in your filter code, refer to the varFloor variable in the StartsWith expression where you want to filter for the floor:

    StartsWith(Name, varFloor)

     

  • hotdogman Profile Picture
    on at

    im kinda dumb, could you show me how I can incorporate the last part in my filter

    hotdogman_0-1721058579286.png

     

  • Verified answer
    fhamm Profile Picture
    on at

    If I'm understanding how you're using the filter currently, I'd change it to this:

    Filter(AvailableRoomEmailName, StartsWith(Name, varFloor) && Name <> "RS_KS11100_1 - Theater" && Name <> "RS_KS11100_1 - Auditorium")

     If you set up the varFloor variable right, it should change to RS_KS11100_X with X being the floor selected in the dropdown box. Does that make sense/work with what you're trying to do?

  • hotdogman Profile Picture
    on at

    Yes that makes sense, I'll get it a try right now

     

  • hotdogman Profile Picture
    on at

    it works @fhamm ily, have a good day this monday

  • fhamm Profile Picture
    on at

    Awesome! Glad it worked 🙂

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!

Leaderboard > Power Apps

#1
wolenberg_ Profile Picture

wolenberg_ 119 Super User 2026 Season 1

#2
WarrenBelz Profile Picture

WarrenBelz 107 Most Valuable Professional

#3
Haque Profile Picture

Haque 103

Last 30 days Overall leaderboard