Hi all -
In our Filemaker database, we have an "Appointments" table and an "Appointment Services" table (being one or more services linked to an Appointment). I am working on a print layout to list all the Appointments on a given date, with a sublist of the Appointment Services for each appointment (shown beneath each Appointment).
I have set the layout to display records from the Appointment Services table (in the Body part), and I have a leading subsummary part which lists the appointment details from the "Appointments" table (when the records are correctly sorted). This works fine, except that some Appointments don't have any Appointment Services connected with them, and I would also like these Appointments to be listed in the printout (they don't show up currently, as I would expect, given that the layout is displaying Appointment Services, not Appointments). I have thought of the following options but would appreciate some help as to the best route to approach this. It's similar to a situation where you might want to show a list of all invoices, each with zero or more line items (as it stands, invoices with no line items would not show up).
1. I could change the layout to display records from Appointments instead - all Appointments would then be listed, however I don't think I could show multiple Appointment Services under each (only the first one)?
2. I could create a script to loop through the found Appointments, checking for any with no Appointment Services assigned, and create a record in the Appointment Services table for each of these appointments - it would be a 'dummy' Appointment Service (perhaps with a title "No Services")
I would prefer not to use option 2 above, as it seems a bit excessive - usually services will be added at some point, after the report is printed, I just want the report to show all Appointments, i.e. with none, one or more services. Is there another way to achieve this?
Thanks very much.