3 Replies Latest reply on May 12, 2015 6:33 AM by philmodjunk

    Confusion about portals



      Confusion about portals


      Hello! I'm just starting out with this program, but I'm really excited about its applications and I'm eager to learn how to use it proficiently. Unfortunately, it hasn't been easy to find useful tutorials.

      I've been scouring this forum and trying every search term I can think of, and I haven't found an adequate result for what I'm trying to do. Basically, I would like to create a window within a record that displays information from another record in the same table. Is possible to use a portal this way? Or can they only be linked up between two different tables?

      I also have an instance where I would like to use a portal to connect two tables, but these tables don't share any common fields, so I'm not sure how to create a relationship between them.

      A more in-depth description is this: I'm using this program to build a garden database with information about plants, pests, companion planting, general planting conditions, health and medicinal uses, and pictures. I have two tables: one for the plants themselves (labeled "plant people"), and one called "plant health" (regarding pest management, diseases, deficiencies, and beneficial bugs). The layout for the plant people records is supposed to have something like an embedded search window, where a user can enter the name of one of the companion plants listed and it will display an abbreviated version of that plant's own record page, which is located in the same table. There would be a second window for searching for pests, and that window would have to connect to the plant health table. But the problem here is that the plant people table and the plant health table don't share any common fields to link up. Is a portal the right device for these purposes? Will it require scripting?

      (Attached is an image of a typical plant record, with the intended search window in the lower right.)

      Any help would be much appreciated. Thanks for reading!



        • 1. Re: Confusion about portals

          I am no expert but I can offer some help in saying that you do HAVE to have a relationship between tables to show them in a portal.

          You can relate relationships that relate to multiple records by having a carriage return in the related table

          So each Plant would have an ID, each pest would have an id and a Plant ID (make this a text field so you can edit it and add multiple lines) You can then also create a value list of the plant IDs which also shows the plant names so that as you add a pest you can select all the plant id's that the pest is related to.

          There will be a better way I am sure but thought I would at least give you a reply that there is a way to do what you want. 

          The same sort of thing applies to companion plants. 





          • 2. Re: Confusion about portals

            The term you are looking for is "self-relationship" where you relate the table to itself. You need something to relate by, e.g. you can relate by Plant Family.

            The next step (if it is not enough), is to try Cathy's suggestion. If this still does not work, try to look up "join table" solution. This is usually being used to resolve many-to-many relationships, but works for more complex self-relationships as well.

            You need a relationship to show the data in the other table. The exception is the global fields which could be seen anywhere without relationship. On top of this you can have cartesian relationship ( looks like X in relationship type) to a table where you can see all records



            • 3. Re: Confusion about portals

              What you describe sounds like what I call a "search portal". Where you enter some text and all records that match to that partial text entry appear in the portal and you can then refine your search by entering more text or select a record by clicking a row in the portal.

              I am somewhat hesitant to recommend this file as it is written for people who already have a working knowledge of FileMaker, but it does illustrate this method and a number of other methods for selecting a value from a list:

              "Adventures in FileMaking #2 - enhanced value selection"

              This is an actual data base file with working examples of each method along with detailed descriptions of how they were set up and how they work.

              A simpler method for finding records that you might want to consider is to set up a global field where you enter or select text and then a script finds all records that match to that specified value.

              Here is a thread on scripted find examples: Scripted Find Examples