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 / How to filter building...
Power Apps
Unanswered

How to filter building names using a toggle

(1) ShareShare
ReportReport
Posted on by

Hello,

 

I'm fairly new to powerapps and I'm struggling on how to filter the room names to only display certain rooms in a building (RS_KS11100) using a toggle value.

 

Please help!

Categories:
I have the same question (0)
  • LaurensM Profile Picture
    12,516 Moderator on at

    Hi @hotdogman,

     

    In case you want to filter your datasource (e.g. within a gallery) to only include certain rooms based on the room name, you could use the structure below. The code below expects a text column storing the room name:

    Filter(
     //Adjust with your datasource name
     Datasource,
     //Only display rooms with name RS... if the toggle is enabled
     //Replace .Value with .Checked should you use the modern toggle control
     !Toggle.Value || 'Room Name' = "RS_KS11100"
    )

     

    In case the column is not of type text, would it be possible to provide additional information on your datasource & column type?

     


    If this solves your question, would you be so kind as to accept it as a solution✔️

    If you liked my solution, please give it a thumbs up👍

     

    Connect with me: LinkedIn | Blog

  • hotdogman Profile Picture
    on at

    The datasource is coming from avaliableroomnames but I'm not sure about the column. I'll attach a couple of screenshots to see if it'll help out?

    Please let me know if you need more information! I'm really new to this so I'm completely lost lol

    Screenshot 2024-07-01 143858.png
    Screenshot 2024-07-01 143838.png
  • LaurensM Profile Picture
    12,516 Moderator on at

    @hotdogman,

     

    Thank you for the screenshots! 😊

    I took a quick look at the room booking template. The name will be stored in the 'Name' column. Would it be possible to use the following code:

    Filter(
     //Adjust with your datasource name
     AvailableRoomEmailName,
     //Only display rooms starting with RS_KS11100 if the toggle is disabled
     Toggle1.Value || "RS_KS11100" in Name
    )

    I also adjusted the logic to only display rooms starting with the respective value when the toggle is turned off.  

     


    If this solves your question, would you be so kind as to accept it as a solution✔️

    If you liked my solution, please give it a thumbs up👍

     

    Connect with me: LinkedIn | Blog

  • hotdogman Profile Picture
    on at

    Hello. First I want to apologize for the late response but I'm still struggling with getting my gallery filtered

    hotdogman_1-1720468776660.png



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 883

#2
Valantis Profile Picture

Valantis 571

#3
11manish Profile Picture

11manish 477

Last 30 days Overall leaderboard