Ask Your Question
0

LibreBase 5.1 : Multiple Table Subforms

asked 2016-03-04 09:50:42 +0200

hmadhi gravatar image

updated 2016-03-07 13:26:26 +0200

Alex Kemp gravatar image

I have the following scenario:

PatientDetails->ConsultDetails (1->N)
ConsultDetails->DispenseDetails (1->M)

PatientDetails

PatientID
PatientName
MedicalAid

ConsultDetails

ConsultID
PatientID
ServiceDate
ReservationNumber

DispenseDetails

DispenseID
ConsultID
TarrifCode
Description
Price

I would like to have a single form that will allow me to add Patient Details, Consult Details as well as Dispense Details. The Consult SubForm (Table) should allow multiple consults to be added. When a specific consult is selected, the corresponding Dispense Details must be shown in the Dispense SubForm (Table).

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2016-03-05 07:18:54 +0200

frofa gravatar image

You'll likely need 3 levels in your FORM structure with PatientDetails in your main (logical) form, ConsultDetails in a sub-form and your DispenseDetails in a sub-sub-form. FILTERING is built into LO FORMS, so when you select an item from your PatientDetails table, the sub-list automatically shows the relevant records. See this tutorial on FORM-BASED FILTERING. You will need to use the FORM NAVIGATOR to setup your sub-forms.

edit flag offensive delete link more

Comments

Thank you for answer and with your guidance I have managed to figure this one out. Another question, is FILTERING built into LO Reports as well. Reason I am asking, is I now want to generate a Report based on current Patient/Consult/Dispense Details. Any guidance on how to do this?

hmadhi gravatar imagehmadhi ( 2016-03-05 11:29:23 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-03-04 09:50:42 +0200

Seen: 776 times

Last updated: Mar 05 '16