7 Replies Latest reply on Apr 6, 2012 12:17 AM by reshma

    Mysteriously record get deleted

    reshma

      Hi All,

       

      Thanks in advance.

       

      I have multi file application. Out of those .fp7 files, one file have global table where I stored all the global/common data & images used in application having one record.

      Now we found one issue some how the record form the global table get deleted and because of that the functionality based on this table not works. There is no single script which delete the record from global table.Even I did not delete the record. Can anybody help me to find out what is reason behind this situation.

        • 1. Re: Mysteriously record get deleted
          s

          Is there any chance you have marked the box to "Delete related records in this table..." in one of your relationships?

           

          cascading delete.png

           

          Do all users log in with Full Access or are you using Privilege Groups?

           

          • 2. Re: Mysteriously record get deleted
            reshma

            Yes, there are chances that application have that "Delete related records in this table." box checked. But now it is very difficult to find out at which places that checkboxes are checked, because the application is very vast. Is there any methodical way to find out that?

             

            Only the Developer has full access to application. And all other users have the different Privilege depending upon their role.

            • 3. Re: Mysteriously record get deleted
              FCallanan

              metasys wrote:

              Is there any methodical way to find out that?

               

              Only the Developer has full access to application.

              Assuming you are the developer, try this:

              Using FileMaker Pro Advanced, run a Database Design Report, HTML output. Include all the files of your solution. When complete, view the report in your browser. Using the browser's "find on page" function, search for occurrences of "Delete related records in this table when a record is deleted in the other table". The occurrences of Yes will help narrow in the search suggested by S, above.

               

              When you locate them, consider changing them in your solution, by unchecking the box in the relationship definition.

               

              Good luck!

               

              Frank Callanan

              Data Pro North East

              Camden, Maine, USA

              • 4. Re: Mysteriously record get deleted
                karendweaver

                After checking for cascade deletes and removing them - you may also want to check some other options.  It's also possible a script step that deletes records is failing.  For example, if you have a go to layout and then delete that fails, the delete record step may delete the record on the current layout. 

                 

                Also it's possible for a user to delete a record without knowing it if they use key commands that suppress the delete record dialog box.  I use custom menus and privileges to prevent this.

                 

                Also - if you have a record that should never be deleted, then there are a couple more things that you can do to prevent this happening.

                 

                First, any privilege sets other than FullAccess should have the delete option for this table turned off.  Then the record cannot be deleted by a user.

                 

                Second - since this table is global fields, the contents of the fields will be retained even if the record is deleted. So on startup - check to see if there is an existing record, and if there isn't, create one.

                 

                It is worthwhile to continue to track down the source of this issue.  Because it could show up elsewhere - in a table where the problem can be serious data loss. 

                 

                Karen

                • 5. Re: Mysteriously record get deleted
                  RonSmithMD

                  Sorry to get in on this just a bit into the stream. Are you doing a scripted Delete?

                   

                  If so, try inserting a Commit Records before the Delete and see if it doesn't resolve it. There is an issue I've found where you can see changes to related record fields 'vanish' without doing a Commit Record prior to a Delete Record script command that makes everything 'revert' back.

                   

                  Ron

                   

                  Ron Smith, MD

                  ron@ronsmithmd.com

                  • 6. Re: Mysteriously record get deleted
                    Malcolm

                    Yes, there are chances that application have that "Delete related records in this table." box checked. But now it is very difficult to find out at which places that checkboxes are checked, because the application is very vast. Is there any methodical way to find out that?

                     

                     

                    You know which table the records are disappearing from don't you. Open the relationship graph and locate a TO which is based on that table. Click on the TO to select it. You can now select all TOs which are based on the same table. Either use the pop-up menu command or Cmd-U / Ctrl-U.

                     

                    Malcolm

                    • 7. Re: Mysteriously record get deleted
                      reshma

                      Hi

                       

                      I have found the casue why that record get deleted. The cause is delete record request script step followed by GTRR script without error capturing. So when there is no related record exist it deleted the record from current layout.

                       

                      Thanks for help.

                       

                      Reshma