When you say you want to display the details of the selected symptom, how is this set up in your database? Is it on "details" field in the symptom table? There are several ways to do this.
Solution 1 (old fashion):
Create a "SelectedSymptom" global field in the visit/symptoms joint table table that you set with the symptom ID everytime you click on a symptom. You add a table occurence of the Symptom table that you will link to the visit/symptoms joint table
PK Symptoms (new symptoms table occurence) -- SelectedSymptom (Visits/Symptoms joint)
As you're going to display only one symptom record going through that link (if I understood you well), you don't need to put the details field in a portal.
Solution 2 (requires filemaker 11)
When you click on the symptom portal row, set a global variable (ex: $$SelectedSymptom ) with the ID of the symptom. Display the "details" field in a portal and add a portal filter testing PK Symptoms (Symptoms table) = $$SelectedSymptom
This should work fine , but you might need to add a refresh script step to make the portal refresh the filter everytime you click on another symptom (not sure)
I hope this helps.
I am following your solution number 1 as I am working on FM 10
I am still confused.
In addition to you what you have explained do I have to program a script?
Please advise, I did apply the solution without the script but it is not working still.
Well you have to use at least one script step to be able to set the "selectedSymptom" field.
Here's a quick example file of what I meant. It's really basic, the refresh of the layouts might not work properly, but I just wanted to show you the global idea.
I'd recommend to add some script triggers "onrecordload" to empty the global fields every time you go to another patient record, to avoid having symptoms selected that the patien doesn't even have
Example.fp7.zip 7.9 K
This should work. I will try and let you know.