4 Replies Latest reply on Mar 5, 2009 9:02 AM by RGoyette

    portals are a pain



      portals are a pain


      I am using a template that came with FileMaker to maintain my database of proposals and users.  The template, called Registration, has events and contacts where I have proposals and users.  It is nice, it has some nice features. There is a button that allows you to register a contact to the current event.  The information on contacts registered to the current event is displayed in a portal.  This is my problem:  I want to do exactly the same thing for samples as well as contacts.  I want the original portal displaying contacts registered to the current event, and another portal displaying samples registered to the current event, with a new button that will register a sample to the current event.  I have duplicated everything as best as I could, and I can register ten samples but the portal is always empty.  If I view all the registered samples in a separate layout they display OK, but not when viewed in the portal.  Has anyone else ever tried something like this with success?

        • 1. Re: portals are a pain

          uuYou need to make sure your tables are correctly linked.


          In the relationships graph, you should see this:


          MAIN TABLE --------------- RELATED TABLE


          Likewise, your layout should match this:



          All the fields in the portal should belong to the related table.


          Hope this helps. 

          • 2. Re: portals are a pain
               That suggestion gets me so close to what I want it hurts.  Now everything seems to work right EXCEPT:  When I add a sample to the current event it shows up correctly.  Then I go to a different event and add a sample, but it shows up in the event I previously added to.  It seems like it is not updating the Event ID when I change events, but is still holding the initial value.
            • 3. Re: portals are a pain

              Make sure your two tables are related by a unique identifier.


              For instance -


              (In this example, contactsA is a list of contacts, eventB is a list of events for each contact) 


              If you have contactA with a serial number field, then in the eventB table, create a field called foreign_key or such. In the relationship view, double click the table for eventB (or whatever your related table is) and make sure contactA serial_field is linked to EventB_foreignKey (a number field, with NO serial defined.).


              (In case you don't know about serial fields, make a number field, double click it and check on the serial number function. this will make a unique id number for each record.) 


              Depending on your set up, you might need to check the box that says allow creation of records through this relationship in the related table.


              Then, on your layout, you can create related records in the portal for that main table record. Also, when you go to a new record, you shouldn't see the previous records created earlier unless you go back to that main record.

              • 4. Re: portals are a pain
                   Thank you for the help.  It took me a while (I'm a slow learner) but it works well now.