I have 4 columns (check-in date, check-out date, status, room) that are used to enter the guest of the reservation. Is it possible to generate a virtual column (list of types) with a list of days (date type) contained between these columns?
Later I want to be able to search in that list, the status romm according to different dates
Thanks
Yes, to a degree.
What do you mean by this?
I am sorry, my english is very bad, harenโt spanish helpersโฆ
i need avoid overbooking, then i need find previous bookings
I think the request is to search for any date to see what availability is on that date.
For example (not the best example I know butโฆ)
Room 1 is booked 2nd to 5th
Room 2 is booked 3rd
Room 3 is booked 2nd to 4th
If you search 4th, how many rooms are free?
I donโt think that will be possible in the way that you are wanting. I actually have a feature request for this:
What it seems like you should actually be doing is validating the room selection against the date selections. This will likely be a an extensive expression, to deal with the ranges of dates, so I wonโt be giving you a complete answer at this time, but Iโll point you in the right direction.
I would have the user enter their dates first, then show them a list of rooms (in a Ref column, pointing to rooms) available for those dates using โdropdown from valid_ifโ.
Presumably you have a parent-child relationship here, rooms being parents, and appointments (or โbookingsโ or whatever you have), being the child, and so rooms will have a [Related appointments] VC.
So you can set your valid_if to something like this:
FILTER(
rooms ,
ISBLANK(
SELECT( [Related appointments][id] ,
AND(
. ...multiple date checks here....
)
)
)
)
For the โmultiple date checksโ please review the " Validate Non-Overlapping Date Range" section of this article:
User | Count |
---|---|
45 | |
34 | |
27 | |
23 | |
15 |