Getting a Record (by key) in a Related Table
I am using FileMaker Pro 11 on Windows and have the following question regarding getting a record by key in a related table. In my database I have 2 tables: Patients and Appointments. These 2 tables are related via key fields (k_ID_Patient and k_ID_Appt). They are serial number type fields (unique).
I have created a Patient form for adding/updating patient information and an Appointment form for adding/updating appointment info. On the Patient form, I have also added a Portal to display the Appointment records for a given Patient. This is working fine. What I would like to do is select an Appointment record from the Portal and then go to the selected Appointment record by retrieving the record from the Appointment table and then displaying the Appointment form (via a script).
I have this partially working. On the Patient form, my portal will display all Appointments for this patient. I can then retrieve from a selected Appointment the k_ID_Appt value (in this case 59). What is not working is how do I retrieve via a script the Appointment record with this key value and then display it in the Appointment form?
Thanks for your help.