Showing results for 
Search instead for 
Did you mean: 
Helper II
Helper II

Problem with customizing the Book a Room template

Hello all,

I have a problem with the template Book a Room.
I am building a table booking tool, the tables are all created as rooms in the exchange and are grouped under a roomlist.
But now I want all rooms to be displayed, also here everything is still ok, I just take the collection "AllRooms" as item for the RoomsGallery and filter this list by my departments.
But now I want that the rooms that are already booked get a red border and the Butto Book disappears. Unfortunately this only works for the first 20 rooms and then I have to reload another 20 rooms via "More Rooms".
Code onSelect "MoreRooms":


If(RoomsLeft >= 20, 
      Set(AvailableRoomsCounter, AvailableRoomsCounter+1);
      Set(AllRoomsConnector, Concat(LastN(FirstN(AllRooms, 20*AvailableRoomsCounter), 20), Address & ";"));
      Set(RoomsLeft, CountRows(AllRooms) - 20*AvailableRoomsCounter), 
    RoomsLeft < 20 && RoomsLeft > 0, 
      Set(AllRoomsConnector, Concat(LastN(AllRooms, RoomsLeft), Address & ";"));
      Set(RoomsLeft, 0));

ClearCollect(AvailableRooms, Office365.FindMeetingTimes({RequiredAttendees: AllRoomsConnector, 
    IsOrganizerOptional: true, Start: StartDateTimeUTC, End: EndDateTimeUTC, 
    MeetingDuration: DateDiff(StartDateTime, EndDateTime, Minutes),MinimumAttendeePercentage: "1", 
    ActivityDomain: "Unrestricted"}));

ClearCollect(AvailableRoomsSorted, SortByColumns(First(AvailableRooms).MeetingTimeSuggestions, "Confidence", Descending));

ClearCollect(AvailableRoomsConcat, Concat(Filter(First(AvailableRoomsSorted).AttendeeAvailability, 
    Availability = "Free"), Attendee.EmailAddress.Address, ","));

ClearCollect(AvailableRoomEmails, Split(First(AvailableRoomsConcat).Value, ","));

Collect(AvailableRoomEmailName, AddColumns(RenameColumns(AvailableRoomEmails, "Result", "Email"), "Name", LookUp(AllRooms, Email = Address).Name))


I have found out that "Office365.FindMeetingTimes" can handle a maximum of 20 items. So my question is, how can I work around this problem?
Furthermore I would like to show who has already booked a table.

Thanks for your help in advance.


Helpful resources

Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,806)