Generate list of days, to can search this

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

0 5 180
5 REPLIES 5

Steve
Platinum 4
Platinum 4

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?

exactly @alphacp

If you search 4th, how many rooms are free?

2 rooms are free , room 2 and room 3

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:

Top Labels in this Space