2 Replies Latest reply on Mar 29, 2010 12:15 PM by agreer

    FileMaker 5.0

    agreer

      Title

      FileMaker 5.0 & 5.5 - Delete related record (not using Portals)

      Post

      Hi again,

       

      I've got a CurrentJobs table where when an item is "completed" AND an update is happening to it, a message pops up asking if the update was applied (it will be fairly common for the answer to be no). If the answer is yes, I'd like the record in the Updates table to be deleted automatically. If no, nothing happens.

       

      PS - The relationship between the two is ALWAYS one-to-one, so using a portal doesn't make any sense.

       

      Is this possible?

       

      Thanks,

       

      April

        • 1. Re: FileMaker 5.0 & 5.5 - Delete related record (not using Portals)
          philmodjunk

          Yes, it's possible though some developers "delete" the record by changing a value in a field so that the record is no longer related to the parent record and thus disappears. That  way you can find the record and undo your delete if that action was performed by mistake.

           

          To Delete the record:

           

          Since ths is 5.5, use Go To Related record to find the related record in the related file.

          Write a script in the related file that deletes the record.

          In your first file have your script use GTRR to isolate the record followed by a perform script step that performs the delete script in the related file.

          • 2. Re: FileMaker 5.0 & 5.5 - Delete related record (not using Portals)
            agreer

            Phil,

             

            You never cease to amaze me...thanks again for your advice and help! It works perfectly.

             

            Thanks!

             

            April

             

            PS - On the note of "hiding" files...I think I may use that technique in other situations, but in this case it is just fine to "lose" the record. We have a more complete record of the update elsewhere. Thanks for the tip!