August 3, 201114 yr Newbies Sorry if this was already covered but I already tried searching for this for hours, I swear. And, as you'll soon see, I'm new to FM relationships. Say I have two tables, each with two fields: Doctors: doctorid, doctorname Patients: patientid, patientname It's a many-to-many relationship so I have a join table: DoctorPatient: doctorid, patientid I set it up to create records on the join table from either of the other two tables. Is there a way for the user to add a patientdoctor relationship by choosing a name from the drop-down list and it adds the correct IDs to the join list? I was able to figure out a solution with script triggers but I want to make sure FMP9 users are able to use it too. jointables.zip
August 3, 201114 yr Here's a link to a popup selector demo technique that I use for populating join tables when a simple popup menu would be too long and cumbersome. However, you could simply use a popup menu. On the Doctor form, create a portal to the join table. In the portal row, format the _kF_PatientID field to be a popup menu using a value list that consists of PatientID and PatientFullName. Only show the second value. Likewise, on the Patient Form, create a portal to the join table. Format the _kF_DoctorID to be a popup menu with a value list that consists of DoctorID and DoctorFullName.
August 3, 201114 yr Author Newbies On the Doctor form, create a portal to the join table. In the portal row, format the _kF_PatientID field to be a popup menu using a value list that consists of PatientID and PatientFullName. Only show the second value. Likewise, on the Patient Form, create a portal to the join table. Format the _kF_DoctorID to be a popup menu with a value list that consists of DoctorID and DoctorFullName. This is exactly what I'm looking for. Thank you so much. I had no idea that feature existed. This is supported on FMP9 and above?
August 3, 201114 yr The script trigger find is FM11 only (isn't that the script trigger release version?). However, you could simply add a button to perform the find in place of the trigger.
Create an account or sign in to comment