I am using this in the OnSelect of a button to check for preventing double booking in a SharePoint calendar:
If(
IsBlank(
With(
{_SelectedStartTime: DateTimeValue($"{DateValue1.SelectedDate} {HourValue1.Selected.Value}:{MinuteValue1.Selected.Value}"),
_SelectedEndTime: DateTimeValue($"{DateValue2.SelectedDate} {HourValue2.Selected.Value}:{MinuteValue2.Selected.Value}")},
LookUp(
Conf_Room,
Room.Value = DataCardValue3.Selected.Value &&
((_SelectedStartTime >= 'Start Time' && _SelectedStartTime < 'End Time') ||
(_SelectedEndTime > 'Start Time' && _SelectedEndTime <= 'End Time') ||
(_SelectedStartTime <= 'Start Time' && _SelectedEndTime >= 'End Time'))
))),
SubmitForm(Form1),
Notify(
"There is already a scheduled meeting in this room at this time. Please select another time",
NotificationType.Error
))
This issue is that I have several rooms that require multiple checks. If room 123A&B is selected for a specific time, I need it to check room 123A and 123B and 123A&B. If room 123A or 123B is selected it also needs to check 123A&B
If this is possible, any help figuring it out is appreciated.