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 - Limit Ro...
Power Apps
Unanswered

Book a Room - Limit Rooms per User

(1) ShareShare
ReportReport
Posted on by 2

Hey all,

i have issues with the template of the Book a Room App.

 

Scenario:

Users are just allowed to book certains rooms. We already configured the rooms itself to just accept request from the users.

But it would be great to only show the Users all Rooms which are available/allowed for them.

 

This wouldnt be an issue, just apply a filter on the Gallery to show only the relevant rooms.

Unfortunately we do have more than 40 rooms so the filter might not show any result (because the List just shows by defaut 40 rooms).

 

To reduce the number of requests to the Office365 Connector i would like to reduce the Room List from the very beginning.

 

Here is what i have so far:

 

 

 

Set(IsPrevRoomSelect; false);;
If(DateTimeRoomChange;
 Set(AvailableRoomsCounter; 1);;
 UpdateContext({ShowLoading: true});;
 Set(RoomsLeft; Blank());;
 If(!NoRoomsList;
 ClearCollect(AllRooms; Office365.GetRoomsInRoomList(RoomsListsGallery.Selected.Address).value)
 );;
 Set(DateTimeRoomChange; false);; 
 
 Set(NumberofRooms;CountRows(Filter(AllRooms;StartsWith(Name;"2.30"))));;
 
 Set(AllRoomsConnector;Concat(FirstN( Filter(AllRooms;StartsWith(Name;"2.30")) ;20) ;Address & ";"));;
 
 Concurrent(
 ClearCollect(AvailableRooms; Office365.FindMeetingTimes({RequiredAttendees: AllRoomsConnector; IsOrganizerOptional: true; 
 Start: StartDateTimeUTC; End: EndDateTimeUTC; MeetingDuration: DateDiff(StartDateTime; EndDateTime; Minutes);
 MinimumAttendeePercentage: "1"; ActivityDomain: "Unrestricted"}));

 If(NumberofRooms > 20;
 If(NumberofRooms > 40;
 Set(AllRoomsConnector1; Concat(LastN(FirstN(AllRooms; 40); 20); Address & ";"));
 Set(AllRoomsConnector1; Concat(LastN(AllRooms; NumberofRooms - 20); Address & ";"))
 );;
 ClearCollect(AvailableRooms1; Office365.FindMeetingTimes({RequiredAttendees: AllRoomsConnector1; IsOrganizerOptional: true; 
 Start: StartDateTimeUTC; End: EndDateTimeUTC; MeetingDuration: DateDiff(StartDateTime; EndDateTime; Minutes);
 MinimumAttendeePercentage: "1"; ActivityDomain: "Unrestricted"})
 );
 Clear(AvailableRooms1) 
 )

 );;
 If(NumberofRooms > 20;
 Collect(AvailableRooms; AvailableRooms1)
 );;
 ClearCollect(AvailableRoomsSorted; SortByColumns(First(AvailableRooms).MeetingTimeSuggestions; "Confidence"; Descending); If(NumberofRooms> 20; SortByColumns(Last(AvailableRooms).MeetingTimeSuggestions; "Confidence"; Descending)));;

 ClearCollect(AvailableRoomsConcat; Concat(Filter(First(AvailableRoomsSorted).AttendeeAvailability; Availability = "Free"); 
 Attendee.EmailAddress.Address; ","); If(NumberofRooms > 20; Concat(Filter(Last(AvailableRoomsSorted).AttendeeAvailability; Availability = "Free"); 
 Attendee.EmailAddress.Address; ",")));;

 ClearCollect(AvailableRoomEmails; Split(First(AvailableRoomsConcat).Value; ","); If(NumberofRooms > 20; Split(Last(AvailableRoomsConcat).Value; ",")));;

 ClearCollect(AvailableRoomEmailName; AddColumns(RenameColumns(AvailableRoomEmails; "Result"; "Email"); "Name"; 
 LookUp(AllRooms; Email = Address).Name));;
 UpdateContext({ShowLoading: false});;
 Set(RoomsLeft; NumberofRooms - 40 * AvailableRoomsCounter)
);;
Clear(AvailableRooms);;
Clear(AvailableRooms1)

 

 

 

My Problem:

The Gallery which is referring to AvailableRoomEmailName is still showing all rooms.

 

What was the idea:

Just reduce the Allroomsconnctor to only request the Rooms which are allowed to the user.

 

I am looking forward to some input from the pros 🙂

Categories:

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 339 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 289

#3
Mohsin Ali Profile Picture

Mohsin Ali 228

Last 30 days Overall leaderboard