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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / For all and displaymode
Power Apps
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:
I have the same question (0)

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 793 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard