Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

displaying data from multiple tables in one portal


This topic is 4182 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hello I have created a database for a hospital clinic that contains 3 tables:

 

1. Main- unique key=pk_main

2. Lab- foreign key=fk_main

3. treatment- unique key=fk_main

 

The lab table and the treatment table both contain a date field and a description field (text)

 

I want to be able to have one portal that will display the records of both the lab and treatment tables on the layout linked to "main"

 

for example,

 

date                Lab description

date                 Treatment description

date                 Treatment description

date                  Lab

date                   Lab

date                   etc

 

Is this possible to do? If so how?

Posted

You need a Visits table which joins Main (which I assume contains patient data, and should be named Patients) to Labs and Treatments.

 

Each Visits record will contain  PatientID, LabID, TreatmentID foreign key fields, which are related to the primary keys of the  appropriate tables.  The Visits table is the only one that needs a date field.

 

A portal to Visits in a Patients layout can then show the fields Visits::Date, Lab::Description, and Treatment::Description.

Posted

Thanks, I will try that

 

so what you are saying is I should have main:

 

pk_main=visits:fk_main

 

visits:pk_visits=treatment:fk_visits

                       =lab:fk_visits

 

Or should it be

 

main:pk_main=visits:fk_main

                      =lab:fk_main

                       =treatment:fk_main

and, treatment:pk_treat=visits:fk_treat

         lab:pk_lab=visits:fk_lab

 

which way would it be? wouldnt this also make many table occurrences as well?

thanks for the help I really appreciate it

Posted

Like this

post-75181-0-77791000-1370972154_thumb.p

 

A portal in Main can show fields from Labs and Treatments because of the chained relationships through Visits.

 

Do a search for Join Tables in Filemaker help for more information.

Posted

Like this

RD.png

A portal in Main can show fields from Labs and Treatments because of the chained relationships through Visits.

Do a search for Join Tables in Filemaker help for more information.

Thanks. I am trying that but FileMaker wants to make additional table occurrences for visits. Is there a way to shut that off?

Like this

RD.png

A portal in Main can show fields from Labs and Treatments because of the chained relationships through Visits.

Do a search for Join Tables in Filemaker help for more information.

Thanks. I am trying that but FileMaker wants to make additional table occurrences for visits. Is there a way to shut that off?

Posted

I do not need additional TOs but when I set up the relationships with treatment and lab pointing to visits FM asks me to make another TO. I don't know why it is doing that. It then defaults the name to visits 2.

Posted

Do you have relationships between Main and Labs or Main and Treatments?  If so, get rid of them.  See the example I posted.

This topic is 4182 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.