I have a flow to "Add a Reservation" from Account. The user needs to select the site (Lookup to Account - type site), Asset (Room) and enter the start and end date of the reservation.
I am having issue checking if there is a reservation for the same site, same asset between the entered start or end date. The trouble is with the date range.
My flow looks like this:
My getReservation filters looked like this: (This just checks if there is any reservation between the start and end date you entered, which is wrong. I want it to check if the dates I entered is a part of any existing reservation)
I tried something like the below, where I tried to get all CONFIRMED reservations for that site and asset. I tried to iterate over this collection, then I placed the decision component to check if my start or end date falls in between any of the existing reservation's dates. I am not sure how to close or end this loop.
My filters for the decision is :
I want to know if this approach is correct or can this be done in a much simpler way? I would appreciate any help in this!
Thank you