I have this desk reservation app and not sure how to restrict users to a single booking per day/single desk per day:
I basically need the code to check the sharepoint list for if there is a booking for the current day against the current user then no further bookings are allowed for that date. They will be allowed to make a booking for the future only then.
Current code:
If(IsBlank("Desk Reservations", Date(selectedDate) && Employee = currentUser.Title),Notify("You can only have one reservation per day"), Navigate(DeskSelect)
Thank you.
Assuming Desk Reservations is the name of your list, try something more like:
If(
LookUp('Desk Reservations', Date = selectedDate && Employee = currentUser.Title, true),
Notify("You can only have one reservation per day"),
Navigate(DeskSelect)
)
Hope that helps,
Bryan
User | Count |
---|---|
252 | |
126 | |
104 | |
50 | |
50 |