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 / 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

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!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,045

#2
Valantis Profile Picture

Valantis 675

#3
11manish Profile Picture

11manish 592

Last 30 days Overall leaderboard