Hi,
I've created a reservation app and added a valid if constraint as follows.
AND(
[Start] < [End],
ISBLANK(
FILTER(
"Room Booking",
AND(
[Room].[ID] = [_THISROW].[Room].[ID],
[Start] < [_THISROW].[End],
[_THISROW].[Start] < [End]
))))
it worked like a charm but then i realized i have a problem where everytime i tried to amend a current entry (existing), the app denied the amendment saying that there's already a reservation made for that particular date.
What's the workaround? Appreciate the help in advance, thanks.
Solved! Go to Solution.
what about:
AND(
[Start] < [End],
ISBLANK(
FILTER(
"Room Booking",
AND(
[Room].[ID] = [_THISROW].[Room].[ID],
[Start] < [_THISROW].[End],
[_THISROW].[Start] < [End]
[keyColumnOfYourTableRoomBooking]<>[_THISROW]
)
)
)
)
or
AND(
[Start] < [End],
ISBLANK(
FILTER(
"Room Booking",
AND(
[Room].[ID] = [_THISROW].[Room].[ID],
[Start] < [_THISROW].[End],
[_THISROW].[Start] < [End]
[_ROWNUMBER]<>[_THISROW].[_ROWNUMBER]
)
)
)
)
User | Count |
---|---|
31 | |
13 | |
3 | |
3 | |
2 |