hi, i have an app where i fill the date and hour of an apointment in a form and in a calendar view i can see the the clients in the dates they where registered but i cant see the calendar view when im filling the form couse it doesnt support it, is there a way that i can create a valid if so if a date and hour is already assigned it doesnt let me save on top of it? or a way that the sistem shows me the available hours for appointments in that date?
ISBLANK( FILTER( "CalendarTable" AND( ([_THISROW].[Date] = [Date]), ([_THISROW].[Time] = [Time]) ) ) - LIST([_THISROW]) )
FILTER(...) gets list of all appointments that already exist with the form’s date and time.
FILTER(...) - LIST([_THISROW]) removes the row in the form from that list, making it a list of other appointments at the same date and time.
ISBLANK(...) asks, are there no other appointments at the same date and time? If yes (there are no others), the form’s date and time is available.
( LIST( "07:00", "08:00", "09:00", "10:00", "11:00", "12:00", "13:00", "14:00", "15:00", "16:00" ) - SELECT( CalendarTable[Hour], ([_THISROW].[Date] = [Date]) ) )
LIST(...) is the list of all possible appointment times in a day.
SELECT(CalendarTable[Hour], ...) gets the list times for all currently-scheduled appointments on the given date.
LIST(...) - SELECT(...) removes the scheduled appointments from the possible appointments slots, leaving only unused appointment slots.
but where would you write those formulas?