Business logic / requiremnet
There are fixed number of events that can be booked/created per hour/fixed time,
for that i have a availability table created with the date , the time and the availability corresponding to that time and date,
now on a separate form we have to choose the available date and time and save which will create the event for that date and time.
issue
now there is a child table where we can select date and time and the event will be created.
But i want to only show those date and time which are available .
so i thought of doing a get_query
on that field and fetch only the available dates from the sql query ,
But query/filter does not apply on date or time field
then i thought i will make those date and time fields as link of the availability table , then on date field only fetch those dates which are available , and on time field only those times which are available for that date ,
.
so on doing get query it fetches the dates and times according to query , but does not set on selection , as its expecting only objects of the table , i.e entire table objects.
.
so i want how can i set a query on a data field (set_query
doesn’t generate a drop down list as i want) , to only show those query fields.
as another objective is to only show distinctive dates .
because there might be multiple entries for same date i.e 5th dec 5pm available -5 , 5th dec 9pm available -1.
so i can select dates from table which are available , then times of that date which are available .
any help is appreciated ,
Thanks