Not sure, if I got it well...
The field with the information has to be in the parent table (patients)
that field gets it's data from a value-list, the items in the value-list are coming from Your 'history-table). So, each patient will have it's own values in that field.
You'll have already a value-list - but IMHO not an own field in the patient-table
Not sure if i can understand your reply.
1 of 1 people found this helpful
If you have the relationship set (similar to):
Patient::patientID = History::patientID
Patient::patientID is the primary key (auto-enter number in that table)
History::patientID is a number field (not auto-enter) as a "foreign key"
(by the way, History should have its own primary auto-enter key field, historyID, for example)
you allow creating related records (in the relationship dialog) IN History
put these related fields on the Patient layout:
History::Anticoagulants (formatted as radio with your value list)
History::Diabetes (formatted as radio with your value list)
History::Smoking (formatted as radio with your value list)
I think that the part you may be missing is in the relationship dialog to allow creation. You can click the "=" symbol in the graph to show the dialog. You may need to take a screen shot, so we can verify you have it set up correctly.
Thank you very much Beverly, much appreciated!!
I'm attaching the photo just for the information! Values are saved, I CANNOT understand though, why making a relationship just to the ID, and secondly, why my History::patientID should be a non auto-enter serial number. I did put it as a simple non-auto serial number in the end.
Sorry for the greek language of the script, you'll get the point!
Relationships have a PRIMARY KEY which should be unique in the 'parent' table. And in the child table the FOREIGN KEY matches the parent.
Some relationship are more than one-to-one, such as you have. (Each patients may have many visits, for example.)
If you auto-enter into a foreign key, it will probably not match its parent and you've lost the relationship.
History can (and should have) its own primary (unique) key field, even if it is never used in any relationships. It is good practice and more or less a pain should you need it after records are already created!
Keep on asking (new topics if needed). And welcome to FileMaker!!
-- sent from myPhone --