Jump to content

Cant manage relationships


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

Recommended Posts

  • Newbies

Hi, am trying to move from Access to FM.(And I'm a painful beginner)


I have 2 tables: 1 with PatientDetails (mother table) and the other with VisitDetails (child table).

While the AutoSerial no with a +1 increment works for all new Patients, I'd like to know to lookup existing patients and add a unique serial no for each visit, while maintaining the PatientID (which defines the relationship between the 2 tables). Is there any way of automating this....

With Access this was a no-brainer....



Link to comment
Share on other sites

Welcome to FileMaker!


The VisitDetails table needs to have its own auto-increment primary key of course. Are you struggling with populating the patient ID foreign key in the VisitDetail table?


Provided that you have  a relationship already set up between patients and visit details on patient ID in both tables:

If you add visit details in a portal you can use the "allow creation of related records" on the visit detail side to auto-populate the patient ID in visit details.

Or you can just script the creation of a new visit detail record (the preferred way since you can vet the data before creating a new visit detail record).

Link to comment
Share on other sites

I had just created this so I'll go ahead and post it!


Hi PDoctor!


On Visits layout, you can select a Patient from the blue popup.  Or you can go to the Patients table and add visits directly by typing a date into the first empty row in the portal.  This is specified by checking 'allow creation' in the relationship graph.

File attached

A scripted creation of child (visit) records would look something like this - when fired from Patient layout:


Freeze Window

Set Variable [ $patientID ; ID ]

Go To Layout [ data-entry layout based upon Visits ]

New Record/Request

Set Field [ Visits::PatientID ; $patientID ]


Hi Wim!  :-)


Edited by LaRetta
Link to comment
Share on other sites

This topic is 2914 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.