4 Replies Latest reply on Jun 7, 2011 1:29 PM by DonaldBennett

    Join Table Woes



      Join Table Woes



      I am absolutely new to relational databases and FileMaker and have run into difficulties that I can't find/understand a fix for. I have a table called person and a table called event. It's a many to many relationship so I put in a join table called eventjoin. I set up portals for the required info in person and in event, but I am unable to edit the info. I can't add people to the portal in event and I can't add events to the portal on people.

      I'm not sure how to upload a sample file to the forums, but here is a copy in my Dropox: http://dl.dropbox.com/u/9863048/Households%20Copy.fp7.zip

      Any help will be appreciated.


        • 1. Re: Join Table Woes

          Using the relationships and portals you've defined only work to link existing Person and Event records to each other in the eventJoin portal. To cretae a new person record or a new event record, you'd need to add a button and script to create the needed new, blank records.

          Here's a new person record that you could perform from a button on your event layout:

          Freeze Window
          Set Variable [$EventID ; Value: Event::Event_ID]
          Go To Layout [Person]
          New Record/Request
          Set Variable [$PersonID ; Value: Person::Person_ID]
          Go To layout [EventJoin]
          New Record/Request
          Set Field [EventJoin::Event_ID ; $EventID]
          Set Field [EventJoin::Person_ID ; $PersonID]
          Go To Layout [original layout]

          Note: to link existing persons to the eventJoin portal, you need to add the EventJoin::PersonID field to the portal and format it as a drop down list or pop up menu listing the PersonID's and Names from the Person table.

          • 2. Re: Join Table Woes

            In the Manage|Database| Relationship tab if you double click the relationship you will see check boxes near the bottom that say Allow Creation of Records via this relationship. If you check those (both since you want to create records either way) and add scroll bars to your portals you shouldnt have problems.


            Phil may be by and tell you that you should create table occurances and check only one side of the relationship in order to ensure that  the functionality you want is present only on  the layouts you want it on. (Id agree)


            Not meaning to speak for Phil. :)




            • 3. Re: Join Table Woes

              I looked at his file and he already had "allow create..." selected. Wink

              Though you don't need allow create selected for Person in the EventJoint to Person relationship nor for Event In the EventJoin to Event relationship.

              • 4. Re: Join Table Woes

                Thanks, PhilModJunk. Your note was exactly what I needed. Smile The people added to events are already in the database.