Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Check multiple rooms for double booking

(0) ShareShare
ReportReport
Posted on by

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.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,660 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,004 Most Valuable Professional

Leaderboard