Hi All,
Can anyone advise how to check for conflict booking? This is for a room booking calendar, I want to filter the room if no booking yet for the selected date and time
I power apps, I have selection for start date and end date as well as selection for start time and end time.
Since I'm capturing the date and time, I set startTime and endTime as below:
Set(startTime, sDate_2.SelectedDate, DateTimeFormat.ShortDate) &" "& TimeValue(Text(sTime_2.Selected.Value)));
Set(endTime, eDate_2.SelectedDate, DateTimeFormat.ShortDate) &" "& TimeValue(Text(eTime_2.Selected.Value)));
I want to be able to filter the available rooms based from the startTime and endTime. I'm using this formula so far:
Filter(
Rooms,
Not(
Title in Filter(
'SharePointCal',
StartDateTime > startTime && EndDateTime < endTime
|| StartDateTime > startTime && EndDateTime > startTime
|| StartDateTime >= startTime && EndDateTime > startTime
|| StartDateTime < endTime && EndDateTime < endTime
).Rooms))
This allows me to books but not check for conflict. Any idea how to fix this, please? Thanks!
Best regards,
Vanessa