5 Replies Latest reply on May 27, 2010 11:29 AM by Sunny1

    Working with Portals



      Working with Portals


      I have a database with School information.  The main page is School District info.  Then I have a portal with tabs for the Public Schools, Private Schools and Charter school information.  Previously, I had three tables, one with each type of school and I had a portal with different tabs for the type of school with info regarding those schools.  I just imported all my school information into one table called Schools but I want to have a portal with tabs so that each tab has school the various information for Public, Private and Charter.  How do I tell the database to bring up only a type of school info per tab? 


      Thank you in advance.


        • 1. Re: Working with Portals

          WIth filemaker 11, you can set up filtered portals for this. With older versions, you can set up a filtered relationship (and then base the portal on the filtered relationship.)


          Let's say you have a field called "SchoolCategory" with values of Public, Private and Charter.


          In filemaker 11, you can set up a filter expression in portal setup as:

          SchoolCategory = "Public" for the portal on the Public school tab, SchoolCategory = "Private" for the private school tab, etc.


          In older versions, you can define 3 text fields for this, cPublicKey, cPrivateKey, cCharterKey, as calculation fields with the text values of Public, Private, Charter respectively.


          Then you define three relationships all linking to different table occurences of the same schools table:

          MainTable::cPublicKey = PublicSchools::SchoolCategory

          MainTable::cPrivateKey = PrivateSchools::SchoolCategory

          MainTable::cCharterKey = CharterSchools::SchoolCategory

          (PublicSchools, PrivateSchools, CharterSchools are all table occurrences of the same schools table.)


          This gives you three relationships, one for each tab.


          An alternative is to use one portal for all three sets of school records, but use a drop down or popup menu field to specify the school category on which to filter the portal.

          • 2. Re: Working with Portals

            I have FileMakerPro 10.  In reading your description of how to do it with an older version, I am not clear.  So, I add three field to my main table (school Districts) and then what?  Do I set up three more tables, one each for the type of school?  I had tables, one each for the type of school before.  Do I only include that one field?


            Thanks for the help.  I wish I was as proficient with this program as you are.  I would love to be an expert.

            • 3. Re: Working with Portals

              You set up more table occurrences, not data source tables. Table occurrences are the boxes you see in the relationship graph. Data source tables are the tables you find listed on the tables tab in Manage | Database.


              Each table occurrence points to a specified data source table. Filemaker confuses this a bit by automatically creating a table occurrence of exactly the same name as your data source table each time you define a new table. They may have exactly the same name, but they aren't the same. To see what data source table is specified for a given table occurrence, double click it or hover the mouse over the arrow in the upper left corner.


              To make additional table occurrences for your schools table do this:


              Open Manage | Database | relationships

              Click the schools table occurrence box to select it

              Click the button in the lower left corner of the Manage | Database window that has two green plus signs.

              This duplicates the schools table occurrence and names it schools 2. If you check, you'll find it has the same data-source table as the original table occurrence.

              You can double-click this new table occurrence and change its name to a more descriptive name like I've suggested in my last post.

              With each new table occurrence for schools, you can link it into your graph like any other table occurrence by dragging from field to to field between the boxes.


              The above procedure is intended to enable you to define multiple, different relationships between the same tables--which is what we need for our three portals.


              Many folks find the terms Table and Table Occurrence confusing. To learn more, click the following link:

              Table vs. Table Occurrence (Tutorial)

              • 4. Re: Working with Portals

                I see what you mean by Table occurances.  So, I have the main table (SchoolDistricts) where I have added three calculated fields cPublicKey, CprivateKey and cCharterKey where the field is defined as "Public School", "Private School' and "Charter School".  Then I take the Schools table, which has all the school information in it, each with a school type from a value list of "public school", private school" and "charter school".  Then I create new table occurrances of the Schools table where I link the relationship of each School Type on the Table occurance to the School Districts Table field CPublicKey etc?  Is that right so far?


                Then when I place the portal into the main School District form, the records I fields I select are from which table?  I tried using the new table occuranes but no records come up.  WHen I use the original Schools Table, all schools, public, private and charter come up for each district.  I have even add the field of school type from the new table occurances (ie:  Public School table occurance, field School Type) and it doesn't work.


                I am missing something.

                • 5. Re: Working with Portals

                  I played some more with the changes you sent and I finally got it.  I had something backward of course.  Thank you Thank you Thank you.