4 Replies Latest reply on Aug 10, 2009 11:17 AM by BetoBoton

    Record Number reference

    BetoBoton

      Title

      Record Number reference

      Post

      It may be a design flaw, but....

       

      Case:

      2 tables Contacts and References where references is who referred the contact.

       

      CONTACTS Contact::ID is related to REFERENCES Referee::ID 

      Contact::ID is indexed auto-numbered on creation 

       

      The fact is if I DELETE the contact in the  CONTACTS Table, I have an Referee::ID number which doesn't match the proper Referee(deleted) correct?

       

      I was trying to have a  REFERENCES Referee::RecNumber field to solve this.

       

      Possible?

       

      What is the proper way to do this?

       

      It seems I'm chasing my own tail, with no tangent exit....

       

      Any ideas would be welcomed.

       

        • 1. Re: Record Number reference
          philmodjunk
            

          I'm not sure what you are trying to do.

           

          You can set a option in the relationship so that when you delete a record from Contact, all related records from Referee are also deleted, but I don't know if that's what you want to do or not.

          • 2. Re: Record Number reference
            BetoBoton
              

            YES exactly what I want to do and have no clue what the "option you mentioned" can be set up. 

             

            I'm on FMP 9 Adv, and no triggering of scripts.

             

            If I delete the person from contacts it has to be deleted from the references table (ALL records that have this Contact:ID in the references table).

             

            As you can see I'm clueless... 

             

            Thanks for any suggestions .

            • 3. Re: Record Number reference
              philmodjunk
                

              OK, then we can do this.

               

              Select File | Manage | Database | Relationships

               

              FInd the relationship line that links these two tables.

               

              Double Click it to pop up the Edit Relationship dialog

               

              You'll find some check boxes at the bottom. Click the "Delete related records in this table when a record is deleted in other table" checkbox on the referee side of the relationship.

              • 4. Re: Record Number reference
                BetoBoton
                  

                Abso bloody lutely easy, mate.

                Extremely thankful.