Check time condition about time with list in mircoflow

0
My Application is about Room Reservation and My major feature is User can’t reserve the same room and the same time. So i decide to check by loop but i can’t access and compare each start time ,end time and room with current reservation.   This is my entity    This is a microflow. and this microflow will return true if user can reserve that without duplicate room and time . and return false if have duplicate same room and same time and have to select room and time again. How can i do it ?
asked
2 answers
0

Hello ! 

 

You need to retrieve in your microflow all the reservations that can overlap with the reservation the user is trying to make. For that, you can retrieve reservations from database, with a xPath.

 

For example, you can check if the User Starting Time is contained between the start and end time of the reservation (meaning the User reservation will start while the reservation is not ended) and same for the end time.

 

Try something like : (UserReservation/StartTime >  reservation/StartTime and UserReservation/StartTime <  reservation/EndTime) or (UserReservation/EndTime >  reservation/StartTime and UserReservation/EndTime <  reservation/EndTime)

answered
0

this it my retrieve object in microflow

answered