cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kriggo15 Advocate III
Advocate III

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
Community Support

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
Community Support

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

Super User
Super User

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 Advocate III
Advocate III

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
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (7,372)