3 Replies Latest reply on Sep 11, 2009 8:26 AM by philmodjunk

    Portal question

    deliciousapple

      Title

      Portal question

      Post

      I have connected two “Client” table occurrences together by “FullName” field and used “X”.  

       

      This enables me to see a list of all clients on my detail form view.  (see photo @ http://galleryDOTmeDOTcom/genehouse#100107)  I use a text object on portal rows to gttr, in the same form view layout

       

      When I do a find in my client table I would like the records listed in the portal to only show those records as well.  Right now it just shows all records, all the time.

       

      Ideas?  

       

      Also I would like to highlight the active row, I know how to do this in a normal portal, one thats comes from another table, but I cant get it to work in this scenario. 

       

      Oh geez, one last question, the portal always scrolls back to the top after I choose a record with my text object button that is on the portal rows.  Anyway to stop this.

       

      Sorry for the less than optimal explanation, I am a novice at this stuff. 

       

      Gene 


        • 1. Re: Portal question
          philmodjunk
            

          There's a way I know to set a filter for your portal using a technique that dates back to Filemaker 4 or older. Still works, there may be a better way, if so, maybe someone will chime in with it.

           

          If you don't have a serial number field that uniquely identifies each client record, define one and Use the Replace Field contents tool to assign a serial ID number to all your existing records.

          Create a new client layout with only one field on it, the above ClientID field.

          Define a global text field: gClientList

          Make your self Join relationship: Clients :: gClientList = Clients 2 :: ClientID

          Place gClientList on your Clients layout.

          If you script your find, (or possibly set a script trigger on your main layout that executes when you leave find mode), the following script will filter your portal to just show the current found set's matching records:

           

          Go to Layout [ClientIDlayout (Clients)]

          Copy All Records

          Go to Layout [Clients (Clients)]

          Paste [gClientList]

          Commit Record

           

          The draw back to this approach is that you use copy and paste which have inherent drawbacks:

           

          1) the referenced fields must be present on the current layout

          2) Copy All Records will destroy any data the user has previously copied to the clipboard.

           

          An alternative is to loop through the script and use set field to build the list of records that Copy All Records does in one step.

          Set field [clients :: gClientlist ; "" ]

          Loop

            Set field [clients :: gClientlist ; clients :: gClientlist & "¶" ]

            Go to Record [Next ; exit after last ]

          end loop

          commit record

           

          Don't see why highlighting the current portal row would be different for your case than any other.

           

          For the Portal Scroll Bar behavior, are you seeing this when you click outside the portal or when you return from your detail view layout? In the first case, there's an option in Portal setup that controls whether the scroll bar snaps back up to the beginning. I'm not sure that it applies when you switch layouts like this. You might have to scirpt something with a Go To Portal row step to reposition the portal.

          • 2. Re: Portal question
            deliciousapple
              

            Thank you so much for the detailed reply!

             

            I am not sure about the copy and paste method, I just might have to give up on this idea of showing a found set in a portal in a self-join.   

            • 3. Re: Portal question
              philmodjunk
                 If the found sets are small, I'd try the second alternative (loop through the records) and keep the clipboard untouched.