Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Error Handling
Unanswered

For all and displaymode

(0) ShareShare
ReportReport
Posted on by

Hi all,

 

I'm making a room booking app connected to an excel spreadsheet on OneDrive. I have 3 dropdown controls; selecting a specific room, a date picker for the start date of booking and a date picker for the end date of the booking. I want to be able to handle logic where if the selected room is already booked between the start date and end date, then the button submit control, which patches the bookings, is disabled. The excel spreadsheet is called 'Bookings'. 

 

I've tried a few things, for end date picker on select property I've got the below code. I've tried to use a For All function to cycle through all records in the source Bookings database, if a selected room has start and end date which is already within the Bookings database then it displays a notification and is meant to disable the submit button however it displays the notification but does not disable the submit button. Open to alternative suggestions. I've tried cycling through the records and creating a collection for matched records and then selecting the submit button property to disabled if the collection is not empty but haven't been able to make this work.

 

ForAll(Bookings,If(And(Value(RoomID)=Value(LookUp(Referencetable,
RoomName=Roomselector.Selected.RoomName).RoomID),Start.SelectedDate>=StartDate,

End.SelectedDate<=EndDate),Notify("Room selected is already booked between those
dates!";,NotificationType.Information);Bookingsubmit.DisplayMode.Disabled))

Categories:

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 Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Error Handling

#1
stampcoin Profile Picture

stampcoin 73

#2
DS-11051211-0 Profile Picture

DS-11051211-0 20

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 9

Overall leaderboard

Featured topics