1 Reply Latest reply on Dec 27, 2013 6:11 AM by philmodjunk

    Record creation via relationship not working

    ToddWines

      Title

      Record creation via relationship not working

      Post

           I have a join table between an "events" table and a "contacts" table so that I can have multiple contacts be included in multiple events (many-to-many relationship). In both cases the relationship between the parent table and the join table allow for creation and deletion of records in the join table via the relationship to the parent table. However, a new record IS NOT created in the join table when a new record is created in the "events" table; I have to manually add a record in the join table. But when a new record is created in "contacts," a new record IS created in the join table. 

           I have created a test DB to see if there was something apparent that I was doing wrong, but in the test DB, everything seemed to work fine.

           Thanks for any light you can shed!

           Todd

           FMPro 11.0v4, Mac OSX 10.7.5

        • 1. Re: Record creation via relationship not working
          philmodjunk
               

                    However, a new record IS NOT created in the join table when a new record is created in the "events" table;

               This is expected behavior. The "Allow creation...." option does not automatically create related records just because a new record is created in a related table. It makes it possible to create a new record in the related table if you attempt to enter data into the related table from a layout based on the parent table--most often by entering data in the blank "add" row of your portal to the related table.

               

                    But when a new record is created in "contacts," a new record IS created in the join table.

               This is not possible just by clicking a check box in Manage | Database | relationship. Either some aspect of your design is creating the illusion that this is happening or some additional action is creating that record for you.

               Note: If you mean that you don't see that blank "add" row in the portal to the join table on your first layout and do on the second and you are sure that you've selected "allow creation..." for the correct table occurrence, then you may need to take a closer look at the match fields selected for that relationship.