3 Replies Latest reply on May 22, 2015 10:03 AM by philmodjunk

    Portal Help

    RichardStrohman

      Title

      Portal Help

      Post

       

      I am still somewhat new to Filemaker and learning, but slowly.

      I am trying to make a task manager database.  I have three tables: Projects, Tasks, and Personnel.  What I am trying to do is have all of the projects in a layout show in a list view and then in the header have a portal that shows all/only the tasks for a certain person in the Personnel table.

      Currently, the portal is showing all of the tasks for the specified person (the portal filters for only one name) but only in the selected record and not in all records.

      Is there a reason why it is doing this?  Maybe my table relationships are off?  I have the Projects table related to the Tasks table and the Tasks table to the Personnel table.  The portal is from the Tasks table and shown on a layout using the Projects table.  Or maybe I need to do something with variables?

      Any help would be greatly appreciated.

        • 1. Re: Portal Help
          philmodjunk

          It sounds like a possible relationship issue, but since my crystal ball has once again gone down, I'd need to know what relationships you've set up and what table occurrence name you've selected in Layout Setup | Show Records From. (This is also shown in the status tool bar as Table: Table Occurrence Name Here just to the right of the layouts drop down when the layout is in layout mode.)

          This last bit is what establishes the "context" from which relationships on your layout--such as your portal will work.

          It will also be helpful to know what you've selected in Portal Setup | Show Related Records From for the portal in your header and how you are specifying which person to use when listing their tasks.

          • 2. Re: Portal Help
            RichardStrohman

            Here is what I have:

            Three tables: Projects, Tasks, Personnel

            Projects has the following fields: ID, ProjectTaskID, Project

            Tasks has the following fields: ID, ProjectTaskIDMatch, PersonnelTaskID, Task, Status

            Personnel has the following fields: ID, PersonnelTaskIDMatch, Personnel

            I have a layup using the Projects table as the table occurrence.  This is the layout that I want the portal on.  The portal is showing records from the Tasks table.  I have it filtering with this: Personnel::Personnel = "Richard".  Richard is the only name that this portal should show tasks for.

            The relationships are as follows:

            Projects::ProjectTaskID = Tasks::ProjectTaskID - This is setup to allow records to be made and deleted in the Tasks table.

            Tasks::PersonnelTaskID = Personnel::PersonnelTaskID - This is setup to allow records to be made and deleted in the Personnel table.

            Hopefully this is enough information?

            • 3. Re: Portal Help
              philmodjunk

              The ID field in Projects would seem to be redundant given how you have set up ProjectTaskID to be your project identifier. The same observation applies to your ID fields in Personnel. I am assuming that ProjectTaskID in Projects and PersonnelTaskIDMatch in Personnel are defined as either auto-entered serial number fields of type number or text fields that auto enter Get ( UUID ).

              Your relationships appear to be this:
              Projects----<Tasks>----Personnel

              Since any given record in Projects will match to only those Tasks that are related for it. Your portal, if unfiltered  would list all tasks assigned to it and only those assigned tasks. The portal filter then "filters out" any related task records that do not have a related Personnel record with "Richard" in the name field. When you place such a portal in the header, it will display records from the context of whichever record is current if your layout is in Browse mode. When printing or previewing the layout, it will show data from the first record on each page of the preview or print out.

              So it is doing exactly what you designed it to do, not what you want it to do. wink

              You'd need a different relationship to show all Task records for a given record in Personnel no matter what record is current on your Projects layout.

              One option is to make a new table occurrence of Tasks and link it to Projects using the X (Cartesian Join) operator in place of the default = operator. In Manage | Database | Relationships, select Tasks and click the duplicate button (two green plus signs). Link any field in Projects to any field in this new table occurence(Tasks 2 unless you rename it). Double click the relationship line to get a dialog where you can change the = operator to X. This matches any record in Projects to all records in Tasks. Do the same for Personnel and link it to Tasks 2 exactly the way Personnel links to Tasks.

              You can now set up your portal to list recors from Tasks 2 and your portal filter to refer to the name field from Personnel 2.

              Note: this process does not actually duplicate any tables. It produces a new Table Occurrence, a new way to refer to a given table so that you can get multiple relationships between the same pair of tables to use for different purposes. See this thread to learn more about Table Occurrences: Tutorial: What are Table Occurrences?

              You can double click a table occurrence box in order to open a dialog where you can edit the different settings for that table occurence and this is what you would do if you wanted to rename them to something more meaningful than the original name followed by a number. I would rename Tasks 2 to be Tasks|All for an example so that it's easier to tell which one to select when picking them from a dialog box that lists them--such as the Show Related Records drop down in Portal Setup.