4 Replies Latest reply on Feb 10, 2011 10:04 AM by philmodjunk

    Tabs and portals



      Tabs and portals


      Apologies if this has already been answered but I haven't been able to find the answer in the forums, web or docs.

      I have a tab control with these tabs: Clients, Projects, Timers.

      I have 2 clients defined and on the Clients tab a portal showing all the projects for that client. So far so good.

      I would now like to click on a project from the portal rows and go to the Timers tab AND on that tab a portal should show ONLY those records for the clicked project. Currently I get all the Timer records for the current client.

      Clicking the portal row seems to go to the next tab OK, but how do I tell the next tab's portal which records to show?

      I have a relationship graph where projects are connected to clients via a clientID and timers connected to projects via a projectID - all set to  "=".

      Am I missing something (apart from a brain)? Should my relationship graph show some other connection?

      Any help greatly appreciated.

        • 1. Re: Tabs and portals

          Hello Markhutch,

          I  think it is possible.

          while  you are in client tab just attached a script on tgiger

          go to timer layout

          perform find by  corresponding project

          then come to the original layout

           go to object (Name the timer tab as a object)

          Just check it .............

          • 2. Re: Tabs and portals

            Thanks. I'll give that a try.

            • 3. Re: Tabs and portals

              I think you need to make the second portal's relationship include the ClientID and the ProjectID.  I assume you already have the ClientID part of that; I would add a global field into the Client Table, called gProjectID.  Add the link between that and the ProjectID in the Timer Table.

              Make the row of the first portal a button (or have a little arrow beside it, say) that when you click on the portal row on the first portal it captures as a variable $ProjectID, and sets the gProjectID field to be that.  It then commits the record and uses Go To Object to go to the second portal tab.

              You may need to force a redraw of the screen.


              Actually, I wouldn't amend the existing relationship, as I'm sure a relationship solely based on ClientID will be very useful.  I would just add a second new relationship.  If ProjectID is unique to the Client then it can be gProjectID::ProjectID, otherwise it should match the ClientID as well.

              To make it clear to users that the portal is effectively filtered I would put the Project ID and ProjectNAme fileds at teh top of the portal.

              Or you could filter the portal by gProjectID; that would have the same effect.

              • 4. Re: Tabs and portals

                With FileMaker 11, I'd modify Sorbsbuster's approach just a little bit.

                Define a portal filter on timers as $$ProjectID = Timers::ProjectID

                Then your script that changes tabs should include these two steps first:

                Set Variable [$$ProjectID ; Projects::ProjectID]
                Refresh Window [Flush Cached Join Results]

                The refresh window step is needed to force the filtered portal to update correctly.

                And you can also set up a conditional format on the fields in the Projects portal to use a fill color to highlight them when

                $$ProjectID = Projects::ProjectID

                That's a nice bit of visual feedback to tell the user what project is "current" in the Timers portal.