3 Replies Latest reply on Feb 24, 2012 9:00 AM by philmodjunk

    Need advice on setting up a portal



      Need advice on setting up a portal


      I'm designing a packing slip and it was going smoothly until I got to where you put in the products. I have a table for customers (their names/addresses/contact info), and a table for products(item code/description/weight), and I started a table with the fields that are packing slip specific (PO number/order date/ship date/carrier and so on)

      Where I'm stuck, is how to link the relationships properly (I think I'm missing some fields that need to be on both tables possibly?), and I can't quite wrap my brain around how I set up a portal so that I can type in an item code, and have the item description and weight automatically fill in. I would also like to have a portal (or the whole view related fields thing?) so I can type in a customers name, and it will fill in their billing and shipping addresses for me. At one point I managed to set it up so that the fields for weight and item description would fill in, but it would only give me one line in a portal that I told to have 10 lines.


      Any assistance would be much appreciated.

        • 1. Re: Need advice on setting up a portal

          You appear to be missing a table. Typical settups of this type look like this:


          Your portal would be to LineItems and that's the table I don't see in your original post here.

          The invoices starter solution is set up on this pattern. This much simpler demo file created by Comment also has that pattern: http://fmforums.com/forum/showpost.php?post/309136/

          Both example files use a method for printing the invoices from a layout based on LineItems to avoid printing limitations encountered when printing from a layout that uses a portal.

          • 2. Re: Need advice on setting up a portal

            Ok so I made a line items table, and I have the proper relationships defined (I think). I still can't get the portal to work however, the first line works but the subsequent lines don't. Is there a different object I should be putting on the layout instead of a portal? The example you linked me to was really helpful in terms of getting the right tables set up, but since the file can't be modified it won't let me look and see how the fields are defined. I've gathered that if I have 3 fields that I want on each line (Item Code/Description/Weight) that I can set Description and Weight to be lookups based on what is in the Item Code field. So basically, I can get one line to show up on the portal that works as I would like it to, but when I get to the second line, the description and weight don't fill in correctly, and when I click off the portal, I can't view anything beyond the first line. Do I need to just put in a separate portal for each line that I want to have show up?


            Also, I am still somewhat lost as to what purpose the Line Items table serves. Does file maker just "make a record" in the Line Items table for each line on a given packing slip, and pull the data from products to populate that record and then show it in the context of "line 1 on packing slip 2 has x quantity of y product"?

            • 3. Re: Need advice on setting up a portal

              The portal is the layout object you need. Both example files that I mentioned use a portal. Both files can be modified. They are fully open to editing. Make sure you haven't copied the file to a location where you do not have "write" permissions. If all else fails, put the file on your desktop. And if the demo file downloads in a zip file, decompress it before you open it or it won't be modifiable.

              Sounds like you have an issue with the primary key field of your Invoice table. In both the starter solution and Comment's demo file, there's a field defined as an auto-entered serial number field linked to a data field in line items. And "Allow creation of records via this relationship" is enabled for LineItems in this relationship. The relationship should look like this but with different names:

              Invoices::InvoiceID = LineItems::InvoiceID

              Invoices::InvoiceID would be defined as an auto-entered serial number.

              LineItems::InvoiceID is usually a number field.

              You then have a second relationship between lineItems and Products:

              LineItems::ProductID = Products::ProductID

              Products::ProductID is another auto-entered serial number.

              LineItems::ProductID is a number field and it's the field formatted with a value list for selecting products in your portal.