4 Replies Latest reply on Feb 21, 2012 5:13 AM by dinora

    Portals - master/detail portals


      See picture, below

      I have a global date (radio buttons) allowing me to see what symtomps of a patient by date.


      I have Patients Table, Visits Table, Symptoms Table, and, visist/symptoms joint table. (4 tables)


      Relations are PKPatient -- FK Patient (Visits Table)


      PK Visit --FK Visit (Visits/Symptoms Join)


      PK Symptoms --FK Symptoms (Visits/Symptoms Join)


      G_Visits(Visits Table) --Symptoms A_Z(calculated field) in the Visits Symptoms Join


      In the layout for Patients I can see the visits by radio button, and clicking on any visit it displays on the portal below the symptoms found.


      Then to the right you see the symptoms details for all the symptoms found during the visit. What I want to do is scroll down through the symptoms found in the Master portal and display the details of symptom selected on the portal row.


      Can anyone help on this.


      Details of the symptoms are displaying on a portal and also out of the portal. I am not sure I need a Detail portal.


      I am having problems understanding how to set up the script

      Thanks is advance


        • 1. Re: Portals - master/detail portals

          Hi dinora,


          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.



          • 2. Re: Portals - master/detail portals

            Hi Thomas,

            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.




            • 3. Re: Portals - master/detail portals

              Hi Dinora,


              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



              • 4. Re: Portals - master/detail portals


                This should work.  I will try and let you know.