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 / Book a Room Template
Power Apps
Unanswered

Book a Room Template

(1) ShareShare
ReportReport
Posted on by 136

Hello,

 

Is it possible to filter Rooms by location?  Currently, all Rooms from all locations are displayed.  Trying to narrow search to a particular location.

 

Thanks,

 

Isaac

Categories:
I have the same question (0)
  • ilanos Profile Picture
    136 on at
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @ilanos

     

    Everything is posible.

     

    You can have a Input box where users can type location or dropdown with all avaialble locations.

     

    For dropdown to show all avaialbe locations put his in Dropdown.Items:

    Distinct( YourRoomDataSource, LocationField )

    Now in the Gallery filter it by that Dropdown (or user input)

  • ilanos Profile Picture
    136 on at

    Could you provide the syntax for filtering user Input?

     

    This is what I have:

     

    Filter(AvailableRoomName, TextInput2)

  • ilanos Profile Picture
    136 on at

    This Filter worked for me: Filter(AvailableRoomEmailName, StartsWith(Name, TextInput1.Text))

     

     

    My only issue is that you have to click on the More Rooms button until the default Room is displayed.  The page is blank until you keep clicking the more rooms button in order to get to the default Room.  How do I Filter so that when you run the app it automatically filters the default Room?

     

     

    Thanks,

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Sorry for bumping in old thread but have you found out a solution to this? I want to add a location field filtered to my country in meeting app. 

  • KroonOfficeSol Profile Picture
    587 on at

    Oke, in this case you can use to formulas two easy filter the datasource: Search() and Filter

     

    Search

    Search you can use when you use a textinput to add a part off the string you want to filter on. In the search filter you can specify the columns (this can be multiple) which has to be evaluated based on the input string. Formula:

    Search(Datasource, Textimput.Text, column1, column2, etc)

    Filter

    Filter you can best use when you want to filter a dataset on a int or specific fullstring (with fullstring I mean that the string to filter is complete and can be matched by the column you want to filter). Filter is great on filtering relationship in a sql database or when you have a choices list where the choices are limited. Practically you wil use a Filter when you use a combobox/list/dropdown control, where the output is a unique number.

     

    With a Filter you can filter on more conditions, but for each condition you add a seperate line (where Search takes in one textstring an eveluate more columns). Filters we can build so the return records are blank when the combobox is blank or to show al when the combobox is blank.

     

    Show no record on blank combobox

    Filter(Datasource
    ,relationship1ID = Combobox1.selected.ID
    ,relationship2ID = Combobox2.selected.ID
    ,etc.
    )

    Show all record on blank

    Filter(Datasource
    ,IsBlank(Combobox1.selected.ID) || relationship1ID = Combobox1.selected.ID
    ,IsBlank(Combobox2.selected.ID) || relationship2ID = Combobox2.selected.ID
    ,etc.
    )

    To go into the second option (Show all records): How the filter works is that it evalutes every condition line and passes the record if the condition line is true. So if the combobox has no selection the IsBlank() part is true. If there is a selection the IsBlank() part is false and the second part off the condition line is evaluated. Is there a match then the second part is true. Hope this makes sense.

     

    Search and Filter

    We can also combine both in one formula. 

    Search(Filter(Datasource
    ,IsBlank(Combobox1.selected.ID) || relationship1ID = Combobox1.selected.ID
    ,IsBlank(Combobox2.selected.ID) || relationship2ID = Combobox2.selected.ID
    ,etc.
    )
    ,Textinput.Text
    ,Column1
    ,Column2,
    ,etc.
    )

    What's great is that both formula's are delegated to the server (offcourse when the evaluation syntax is build correctly), so the return collection can be up to 2000 records if needed.

     

    Bonus

    In this example we talk about a combobox or textinput field. This is great but just as easy we can use a variable in our Filter or Search. Because you can pass variables to the screen in the navigation() formula (in the context part) this is super easy to build. Do like:

    Navigate(ToScreen, Cover, {Variable:value you want to put in the variable}) 

     

    Then on the hidden property off the ToScreen you reset the variable to blank. Like:

    UpdateContext({Variable:Blank()})

     

    If you then go to the screen for another part off you're app and don't add a variable in the navigate() formula. So like:

    Navigate(ToScreen,Cover)

    The datasource is not filtered. This because you have added the following syntax to your filter:

    ,IsBlank(Variable) || VariableID = Variable

     

    This way you can create re-usable screen, which can adept to the user, his role and his privileges. I have a playlist with several short video's on how to do this and posted this on youtube. If you want to see this follow this link: PowerApp - Re-Use Screens

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard