6 Replies Latest reply on Jan 17, 2014 1:44 PM by clrclarky

    Portals and lists

    clrclarky

      Title

      Portals and lists

      Post

           Running Filemaker pro 13 advanced

           Hi Please can someone help me with a portal issue its been so long since i done work on filemaker

           I have one database well call it main the relationships are in place for products to be viewed from another table thats fine but when i place a portal with records i want to view it only shows 2 if I use a repeating field that's displayed fine, I hate portals

           I'm getting a stage where laptop and wife are going out the door never to return

            

            

        • 1. Re: Portals and lists
          philmodjunk

               You'll need to describe the relationship that you set up and the options that you selected for your portal.

               Is your portal specified to only show two rows in portal setup..? (Double click the portal below the first portal row while in layout mode to open portal setup or choose that option from the Format menu after first selecting the portal.)

               Do you have only two records with the needed values in their match fields in order to show in the portal? (Check the values of the match fields)

               Did you add a portal filter? (If so, please copy and paste your filter expression into your next comment posted here.)

          • 2. Re: Portals and lists
            clrclarky

                 Hi Phil,

                 I have only 2 records that i want to display having been out of touch with filemaker for may years and the brain is rather rusty,

                 can you please explain about the portal filter as wife is about to put the dog in car and speed off into sunset 

                 if their is a portal filter what is the script for it

                  

                 cc

                  

                  

            • 3. Re: Portals and lists
              philmodjunk

                   What you just posted:

                   

                        I have only 2 records that i want to display

                   Does not seem to match what you posted at the beginning:

                   

                        but when i place a portal with records i want to view it only shows 2

                   Please describe what you need and please answer the questions that I have asked.

                   I don't see that you even need a portal filter. It's an added complication best avoided when first starting out, but it's an option you can select inside Portal setup... A portal filter is a calculation that you can define (you don't need to) that can further reduce what records appear in the portal.

              • 4. Re: Portals and lists
                clrclarky

                     Hi Phil, 

                      

                     Sorry rusty as I said I have 2 fields in a table (table with many records) that I want to display in the portal, is their a book about scripting that can help me understand scripting and what actions will come from those scripts 

                • 5. Re: Portals and lists
                  philmodjunk

                       What you describe is not scripting. You are dealing with relationships and layout design. I am willing to walk through the settings with you to help you understand why it is not working, but to do that, you'll need to answer my questions. wink

                       There are a number of available training materials, even You Tube movies to teach you about FileMaker, but here's a short "primer" on portals:

                       Portals are a way to put up a "miniature form" inside your layout for displaying data from a related table. Usually, but not always, this is to enable you to view and edit data from multiple related records.

                       Before you can set up a portal, you need a relationship. Normally, this will be a "one to many" relationship where one record shown on your layout links to more than one record shown in the portal.

                       Let's say you have two tables named Invoices and LineItems. In Invoices, define a number field named __pkInvoiceID. Use field options to set it up to auto-enter a serial number. This field will be unique for each record in Invoices which makes it a good field to use to set up our relationship. Define a number field in line items named _fkInvoiceID.

                       Now click over to the relationships tab (found in Manage | Database | Relationships). You find a table occurrence "box" named invoices and one named Lineitems. Use the mouse to drag from __pkInvoiceID to _fkInvoiceID. You now have a relationship to use for your portal.

                       But portals are very often used to create new related records in the portal's table (lineItems in our example). To make that happen, double click the relationship line to open the Edit Relationship dialog. Click the "allow creation of records via this relationship" check box for LineItems. This makes it possible to add a new record in the portal just by typing data in a special "add row" that looks like a blank portal row in your portal.

                       Click OK to leave Manage | Database.

                       Go to your Invoices layout and use the portal tool in the status toolbar to draw a rectangle where you want your portal.

                       This opens portal setup, where you can specify the options that you want. The typical options you are most likely to need are:

                       Show Vertical Scroll bar: this allows you to show an unlimited number of records in your portal as you can scroll the list of records in the portal with this scroll bar.
                       Allow deletion of portal records: This allows you to delete a portal record directly from the portal.
                       Number of Rows: This controls the total number of rows shown in your portal.

                       When you first add the portal row to your layout and get the portal setup.. dialog, clicking ok opens a second dialog where you can select what fields you want to appear in your portal row. Once you have selected the fields, you are returned to the layout where you can make additional changes, such as resizing your fields and adding field labels as you see fit to do.

                       Now enter browse mode, Create a new invoice record if you need to and then try entering data into the portal. You'll find that you also have a layout for the portal's table that you can switch over to if you want to see all the data in the portal's table without using the portal.

                       How this works:

                       In order for a line items record to show in the portal for a given record in Invoices, the value in _fkInvoiceID  for the line items record has to exactly match the value in _pkInvoiceID for the Invoices record. When you type data into a field of the "add row" of the portal, FileMaker creates a new record in the LineItems table for you and copies the value of __pkInvoiceID from the current Invoices record into the _fkInvoiceID field of the new Line Items record. You can actually create this same result by hand if you change layouts to the LineItems layout, create a new record there and type a number into the _fkInvoiceID field that matches the __pkInvoiceId of a record in Invoices. If you change back to invoices and find the record with that ID number, you'll see your new record in the portal.
                        

                  • 6. Re: Portals and lists
                    clrclarky

                         Hi Phil,

                          

                         Thank you for your help these portals have been the bain of my life and now understand have a wonderful weekend

                          

                         Chris