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

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

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard