3 Replies Latest reply on Feb 20, 2014 12:14 PM by KellyCarlson_1

    Help with Relational Databases



      Help with Relational Databases


           I have a database with two tables related by a number field that has an auto-enter serial attribute on one of the tables. When I create a new record in the table with the auto-enter field, it seems to generate a new, blank record in the other table. 

           I had a feeling it had to do with how I had my layout configured, but even getting rid of some of the specific fields I've set up the issue seems to persist. Is there something I've done wrong with how I'm relating the tables?

        • 1. Re: Help with Relational Databases

               Where do you see that "new blank record"?

               I would guess that it's a row in a portal.

               If you have enabled "allow creation of records via this relationship" for the portal, then an extra blank row automatically appears in the portal. This is there as a place to create new related records by entering data into one of the fields in this blank portal row.

               You can make this row disappear by clearing that "allow creation.." check box, but then you have to use a button/script to create new records in your portal instead of just entering data into the "add row" of the portal.

          • 2. Re: Help with Relational Databases

                 I'm new to the filemaker format, but I'm guessing from the previous answer that the placeholder that is being created for the related portal record won't actually be written into the file unless you enter data into it. This would be in keeping with the need to write a foreign key into the related table. 

                 Try creating a record on the main table then  after commiting it open yup the related table to see if you have a blank record with the foreign key field populated or no blank records 

            • 3. Re: Help with Relational Databases

                   Turns out I had one of my layouts set up wrong. I had it associated to the other table, which was causing a lot of duplicated entries and blank fields. Thanks for your feedback guys.