cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
kriggo15
Level: Powered On

Book a Room Template - Need Help

I've began modifying the template a little and have ran into a snag. I've modified it to show AllRooms instead of AllRoomLists and my organization has over 2500 rooms.

 

  1. My gallery is only showing the first 100 rooms. How do I fix this to show all rooms?
  2. Our room names start with a city and I want to add a dropdown that will allow a user to choose a city and have the gallery filter on rooms in that city. Then they could search rooms within that narrowed down list. How would I accomplish this?
1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Book a Room Template - Need Help

Hi @kriggo15 ,

The reason why you could only get 100 rooms in the gallery is that:

There is a limit of 100 items for dropdowns and Galleries load in 100 blocks.

Having a list of over 100 items is a bit unweildly, so its usually a better idea to have a search, or dropbowns, to Filter by location. This will allow you to see all rooms. 

So your second thought is very wise.

Here's a similar issue for your reference:

https://powerusers.microsoft.com/t5/Building-Power-Apps-Formerly/Getting-list-of-all-rooms/td-p/1775...

 

Could you tell me in details your format of your room names?

I assume that it looks like: city+number

You could set the drop down's Items: 

Distinct(Match(AllRooms.Name,"[a-zA-Z ]+"),FullMatch)

//using this will return all the city name   

You could refer Match function to see how to get text based on your demands:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-ismatch

Then, set the gallery's Items:

Filter(AllRooms,StartsWith(Name,dropdown1.Selected.Result))

//Then it will only display the rooms that start with the city that you choose

 

 

Bets regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Community Support Team
Community Support Team

Re: Book a Room Template - Need Help

Hi @kriggo15 ,

The reason why you could only get 100 rooms in the gallery is that:

There is a limit of 100 items for dropdowns and Galleries load in 100 blocks.

Having a list of over 100 items is a bit unweildly, so its usually a better idea to have a search, or dropbowns, to Filter by location. This will allow you to see all rooms. 

So your second thought is very wise.

Here's a similar issue for your reference:

https://powerusers.microsoft.com/t5/Building-Power-Apps-Formerly/Getting-list-of-all-rooms/td-p/1775...

 

Could you tell me in details your format of your room names?

I assume that it looks like: city+number

You could set the drop down's Items: 

Distinct(Match(AllRooms.Name,"[a-zA-Z ]+"),FullMatch)

//using this will return all the city name   

You could refer Match function to see how to get text based on your demands:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-ismatch

Then, set the gallery's Items:

Filter(AllRooms,StartsWith(Name,dropdown1.Selected.Result))

//Then it will only display the rooms that start with the city that you choose

 

 

Bets regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

PowerAddict
Level 10

Re: Book a Room Template - Need Help

Hi, 

 

Results in a gallery get fetched in bundles of 100. If you scroll down to the bottom of the gallery, you will see the next 100 records. If you do not want to have this behavior, try collecting all of your rooms in a collection either in the OnStart property of the app or the OnVisible property of the 1st screen of the app. That should solve issue #1. 

 

For issue #2, I have a dropdown of cities, and a gallery of rooms: I have set the items property of my gallery to Filter(Rooms,Dropdown1.Selected.Value in Value) (the 2nd value you see is my column in the list of rooms - you can replace it with the column name that stores room names in your datasource). Please refer to the screenshots that show filtered list of rooms based on the city selected in the dropdown. 

kriggo15
Level: Powered On

Re: Book a Room Template - Need Help

I began working on this project again so, sorry for reviving an older thread.

 

I'm having an issue returning all of the rooms I need. As stated before we have about 2500 rooms across 30ish cities. Most rooms follow a naming convention of City_Building_Floor_Room. I've added a dropdown so the user can first choose a city, then can search for the room name (screenshot below). Even if a city had more than 100 rooms, I would expect that as the user types in the search box, results would begin showing up as the list narrows.

 

When choosing the first couple cities (starting with A-B), it works fine. When I get to Chicago, only 5 results are returned and there should be about 30. All subsequent cities return 0 results. I'm assuming because I reaching the max amount of records very early on in my filtering.

 

Here's my gallery filtering function: Search(Filter(RoomsLists, drpLocation.SelectedText.Value in Name),SearchBox1.Text,"Name")

findroom1.png

 

How do I fix this?

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (6,249)