Starting with a script that matches query reservation dates with all existing reservations in all rooms, and returning ‘available’ for every reservation that does not conflict, the script produces an accurate list of matches ruling out those that conflict. The ones that do NOT conflict are labelled ‘available’ in a field.
But the second script, meant to return just one instance of each room to expedite booking, needs debugging.
//eliminates conflicts already found in first script, returning all date sets that are "available"
// places duplicate kf_propertyID found in first script records adjacent
Set Variable [$PR: Value:Reservation::kf_propertyID]
Go to Record/Request [Next]
Go to Record/Request/Page //
Go To Record/Request/Page
[Next:exit after last]
End Loop // the idea is end up with only one kf_propertyID that is also 'available'
But the script fails to omit one duplicate or leaves out one room entirely that is ‘available’. Otherwise it works.
Any help is greatly appreciated.