Hi @Anonymous ,
If the AbcRoom with the date 2020-07-03T13:00:00.000Z - 2020-07-03T14:00:00.000Z has already been booked before, and you do not want it to be shown up in the new collection even though the AbcRoom has not been blocked with date 2020-07-05T13:00:00.000Z - 2020-07-05T14:00:00.000Z ?
I think you have not understood my statement mentioned before. I mean, if the AbcRoom with the date 2020-07-03T13:00:00.000Z - 2020-07-03T14:00:00.000Z has already been booked, but the AbcRoom has not been booked with the date 2020-07-05T13:00:00.000Z - 2020-07-05T14:00:00.000Z ? What about this? Do you get it? How do you want to handle this condition?
For date 2020-07-03T13:00:00.000Z - 2020-07-03T14:00:00.000Z in your (DateTimeBookingColllectionUTC) collection, the Office365Outlook.FindMeetingTimes() function result would not include the AbcRoom , but the AbcRoom has not been booked with the date 2020-07-05T13:00:00.000Z - 2020-07-05T14:00:00.000Z , so for 2020-07-05T13:00:00.000Z - 2020-07-05T14:00:00.000Z in your (DateTimeBookingColllectionUTC) collection, the Office365Outlook.FindMeetingTimes() function result would include the AbcRoom.
If you do not want the AbcRoom to be shown up even though the AbcRoom has not been blocked with date 2020-07-05T13:00:00.000Z - 2020-07-05T14:00:00.000Z , I have made a test on my side, please consider take a try with the following workaround:
Clear(AvailableInResourceCollection);
ForAll(
DateTimeBookingCollectionUTC,
If(
IsEmpty(AvailableInResourceCollection),
Colelct(
AvailableInResourceCollection,
AddColumns(
Office365.FindMeetingTimes(
{
RequiredAttendees: AllRoomsConnector,
IsOrganizerOptional:true,
Start: StartTimesUTC,
End: EndTimesUTC,
MeetingDuration: DateDiff(
StartTimeBooking,
EndTimeBooking,
Minutes
),
MinimumAttendeePercentage: "1",
ActivityDomain:"Unrestricted"
}
),
"Room Name", First(Locations).DisplayName)
)
),
Colelct(
AvailableInResourceCollection,
Filter(
AddColumns(
Office365.FindMeetingTimes(
{
RequiredAttendees: AllRoomsConnector,
IsOrganizerOptional:true,
Start: StartTimesUTC,
End: EndTimesUTC,
MeetingDuration: DateDiff(
StartTimeBooking,
EndTimeBooking,
Minutes
),
MinimumAttendeePercentage: "1",
ActivityDomain:"Unrestricted"
}
),
"Room Name", First(Locations).DisplayName)
),
'Room Name' in AvailableInResourceCollection.'Room Name'
)
)
)
)
Best regards,