I’ve got a data type called ‘Appointment’ that has an Opening Hour and Closing Hour field (both dates).
In my Do A Search For, i’d like to call a list of Appointments who’s Closing Hour (date) is less than it’s Opening Hour (date). But, I can’t reference the same appointment to access it’s Opening Hour.
A simple thing to do, but maybe I’m over complicating it in my head. This is what I have so far:
Any idea how I can do this?
You need to specify the parent group for the Finish button to target the data. I would also suggest to target the repeating group itself rather than using a new search.
Thanks but I still can’t do a comparison between the ClosingHour and OpeningHour and return a number of Appointments that meet that criteria.
The use case is, I want to show an error message if the number of Appointment’s who’s ClosingHour < OpeningHour is greater than 0 (i.e they exist).
However, I cannot get a list of Appointments that matches that criteria.
@Bubble @eve any ideas as well?
Thanks @nocodeventure as well
What data type is the OpeningHour?
Both are of type ‘Date’ which means Bubble lets you use comparison operators like > < = etc. but the data call itself won’t let me reference the appointments fields in a comparison
I think you should use the range operator and data type range to make bookings. Look at the editor link below. You should trigger the alert when creating the booking and not when storing, which isn’t possible to store negative values with range operators inside Bubble!
#### ...'s current date range (calendar)
This state returns the range of the current calendar view (the start and end date of the view). The type is date range.