Showing results for 
Search instead for 
Did you mean: 
New Member

Book a room template with filter throws an error

Aim is to filter  set of room s for end users to book. Just started testing to filter out single room Name = "3.16(City)"


Point 1 - On Visible property of RoomSelectScreen , I have added the following to filter in the following code


Set(CalendarFromSelectMeeting, false);
Set(AvailableRoomsCounter, 1);
UpdateContext({ShowLoading: true});
Set(RoomsLeft, Blank());
Set(DateTimeRoomChange, false);
ClearCollect(AvailableRooms, Office365.FindMeetingTimes({RequiredAttendees: AllRoomsConnector, IsOrganizerOptional: true,
Start: StartDateTimeUTC, End: EndDateTimeUTC, MeetingDuration: DateDiff(StartDateTime, EndDateTime, Minutes),
MinimumAttendeePercentage: "1", ActivityDomain: "Unrestricted"}));

ClearCollect(AllRooms, Filter(Office365.GetRoomsInRoomList(RoomsListsGallery.Selected.Address).value, Name = "3.16(City)"))
If(CountRows(AllRooms) > 20,
Set(AllRoomsConnector, Concat(FirstN(AllRooms, 20), Address & ";")),
Set(AllRoomsConnector, Concat(AllRooms, Address & ";"))

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, ","));

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

UpdateContext({ShowLoading: false});
Set(RoomsLeft, CountRows(AllRooms) - 20 * AvailableRoomsCounter)

Point 2 - On start property of the app, I have added the following filter

ClearCollect(RoomsLists, Office365.GetRoomLists().value);
If(CountRows(RoomsLists) <= 1,
Set(NoRoomsList, true);
ClearCollect(AllRooms, Filter(Office365.GetRooms().value,Name = "3.16(City)"));
Set(AllRoomsConnector, Concat(AllRooms, Address & ";")),
Set(NoRoomsList, false)


And I receive the following runtime errors at two control , One in room select screen and button save changes


Office365.FindMeetingTimes failed: { "error": { "code": "BadArgument", "message": "Attendees must be added if the organizer is optional", "details": [ { "code": "UnsupportedScenario", "target": "IsOrganizerOptional", "message": "Attendees must be added if the organizer is optional" } ] } }


No room s get displayed when I add the filter to a single room.





Helpful resources

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (1,756)