In the form I have a data record field where all free rooms are displayed. All occupied rooms are not displayed. However, if I have a reservation for the future, the assigned room is immediately marked as occupied even though it is still available until the specific reservation date. So far I have no idea how to solve the problem.
Page 1 / 1
Hello,
You could use a formula to check if the room is free "today":
Where the formula "free today" is:
IF(AND(DATETIME_DIFF(From,TODAY(),'days')<0,DATETIME_DIFF(TODAY(),To,'days')>0),"Yes",
IF(AND(DATETIME_DIFF(From,TODAY(),'days')>0,DATETIME_DIFF(TODAY(),To,'days')<0),"Yes",
IF(AND(DATETIME_DIFF(From,TODAY(),'days')<0,DATETIME_DIFF(TODAY(),To,'days')<=0),"No",
IF(AND(DATETIME_DIFF(From,TODAY(),'days')<=0,DATETIME_DIFF(TODAY(),To,'days')<0),"No"
))))
Using the formula "Today()" may not be a good option since it's being computed all the time and can hence have some consequences on performances.
This being said, I guess that you want to compare reservation dates with customer required dates, meaning that you will not need to use the "Today()" function.
Regards,
Pascal
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.