web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Stop Double Booking on...
Power Apps
Suggested Answer

Stop Double Booking on SharePoint Online List

(1) ShareShare
ReportReport
Posted on by 2
I have a "BikeBook" list where users can book bikes. When a new item is created, I want to check the values of BikeName, BookingDate, and BookingStartTime. If another item is created with the same BikeName, BookingDate, and BookingStartTime, the item should not be created, and an error message should be displayed. I want to prevent double booking for the same bike, on the same date, and at the same time. How can I achieve this using Power Apps?
 
I have the same question (0)
  • Suggested answer
    vipuljain03 Profile Picture
    673 Super User 2026 Season 1 on at
    To prevent/stop double booking from your Power Apps form, you can implement a validation check before submitting the form.
    Let's say, you have a Dropdown for BikeName, Date Picker for BookingDate, and a Time Picker for BookingStartTime. You will have a Button to submit the form.
     
    On the OnSelect property of the button, add the below code:
    If(
        CountRows(
            Filter(
                BikeBook, 
                BikeName = DropdownBikeName.Selected.Value && 
                BookingDate = DatePickerBookingDate.SelectedDate && 
                BookingStartTime = TimePickerBookingStartTime.SelectedTime
            )
        ) > 0,
        Notify("This bike is already booked for the selected time and date.", NotificationType.Error),
        SubmitForm(BookingForm)
    )
     
    Optionally, you can also disable the Submit button if conflict is detected. This ensures that the submit button is only enabled when there is no conflict.
    On the DisplayMode property of the button, you can add below code:
     
    If(
        CountRows(
            Filter(
                BikeBook, 
                BikeName = DropdownBikeName.Selected.Value && 
                BookingDate = DatePickerBookingDate.SelectedDate && 
                BookingStartTime = TimePickerBookingStartTime.SelectedTime
            )
        ) > 0,
        DisplayMode.Disabled, 
        DisplayMode.Edit
    )
     
    -------------------
    If this reply helped you, please mark this reply as suggested answer ✔️ and give it a like to help others in the community find the answer too!
    Thanks,
    Vipul

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 493 Most Valuable Professional

#2
11manish Profile Picture

11manish 479

#3
Haque Profile Picture

Haque 328

Last 30 days Overall leaderboard