4 Replies Latest reply on May 10, 2012 12:36 PM by tracylynn1212

    Delete record actually deleted ALL records???



      Delete record actually deleted ALL records???


      Any suggestions as to why a layout used for data input, creation and amendment of a record, with a summary portal of the same records to the righthand side should delete all the records in the table rather just the record that was being worked on and to be deleted?


      Thankfully half could be recovered from a daily backup, but this could happen to any layout, so need to understand why this occurred, if poss.


      Using Windows XP SP3 & FMP 10

        • 1. Re: Delete record actually deleted ALL records???

          It suggests that the portal is a self-join defined with 'X' which is Cartesian Product relationship (meaning all records in the portal relate automatically to the record you are viewing) ... in other words, all other records to all records.  Or, some people use constants on both side of the relationship (Cartesian only came in in vs. 7).  Constant means using Main::one = Main_sj::one, for instance.


          Then, if you have 'delete' related records' checked on the portal side and you delete the current record, it will delete them all. 


          UPDATE: Explained constant relationship

          • 2. Re: Delete record actually deleted ALL records???
               Thanks - the wording is conflicting, or confusing at best.  I do indeed have a X join from a TO back to the original table for this portal and it seemed logical to me to have it selected in the DB Management of the table join to "delete related records".  As you rightly state, by NOT having this option selected, the individual record is deleted and not the entire table contents.
            • 3. Re: Delete record actually deleted ALL records???



              Delete related records when a record in this table is deleted...and "X"...all records are related.


              Well caught LaRetta.  Nice Job.

              • 4. Re: Delete record actually deleted ALL records???


                I had the same issue with my database in FMP 12 where when I deleted one record then ALL my records were wiped out. I have an X relationship from Table 1 to Table 2 and under Table 2 it had "Delete related records in this table when a record is deleted in the other table" checked. I unchecked it, and sure enough, only the specific record I needed deleted was removed instead of ALL my records.


                Good job on your resolution, thanks!