
Announcements
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?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)
)
If(
CountRows(
Filter(
BikeBook,
BikeName = DropdownBikeName.Selected.Value &&
BookingDate = DatePickerBookingDate.SelectedDate &&
BookingStartTime = TimePickerBookingStartTime.SelectedTime
)
) > 0,
DisplayMode.Disabled,
DisplayMode.Edit
)