1 Reply Latest reply on Jul 29, 2011 8:13 AM by philmodjunk

    Field Erased - Data Lost

    charliefoxtrot

      Title

      Field Erased - Data Lost

      Post

      Just after things seemed to be going smoothly with my project, I suffered a major setback this morning when I discovered that there has been a severe loss of data. I have one field in the database that has been erased in all records created prior to this Tuesday. I've checked the simple stuff that came to mind: the field on the form is connected to the proper field in the database, the layout is correct, and FileMaker is set to browse mode.

      This has happened to me twice while entering records. 300-500 words in to a data entry, this one field is erased. Sometimes other fields are erased too, but most of the time it's just the field I'm typing in. I'm not sure if this could be related. What's strange is that there is an identical field on another layout (but in the same database) that has not been affected at all. That leads me to believe it's not an issue with scripts or the capacity of a field. 

      There is a script on the field that is supposed to strip extra formatting. I've set it up under Manage --> Database --> Fields then Auto Enter Calculation, replacing exisiting value. The script is simple: TextFormatRemove ( Self )

      Some info on the database: There are 3 tables. A master table holds two large text fields and a few dozen smaller fields for stats. It also generates a uuid for each record. Two secondary tables hold information about people and assetts related to the primary table through the uuid. This allows unlimited associations -- we don't max out when there are a lot of people associated with a record.

      My most recent backup is from the end of last week, so there will be about 20 records that have gotten deleted. I know FileMaker Server maintains daily backups. Without Time Machine (which wasn't backing up) is there any way to recover the data that has been lost? This will be a major setback for us, as the data is generated in real time and is impossible to recreate.

        • 1. Re: Field Erased - Data Lost
          philmodjunk

          No way to recover the data that I can think of. (And FileMaker Pro can also be set up to make hourly backups with a bit of scripting...)

          You'll also need to investigate why/how this data was deleted in the first place. That's not something we can easily diagnose from here without knowing a lot more about your database.

          A first place to look is for any scripts that may be performing a task that deletes the data or it's record under circumstances that you haven't expected. Any script that clears a field (if it's just data in a field that's missing while the record itself is still there) or deletes a record or found set (If the entire record is missing) is a suspect to examine.

          Here's one scenario that occasionally messes up the unwary:

          You have a script that uses Go To Related Records (GTRR) to pull up a set of records and then deletes some records. If this script runs when there are no related records for GTRR to "go to", and you do not test either for the presence of related records, the script stays on the current layout and the records deleted are deleted from the current layout's table instead of the records in the table of the layout GTRR was supposed to change to bring up the related records...

          You may also want to check relationships and layout design details to see if the data is really there, but your current design prevents the layout from displaying the data the way you expect. (This may be the case if the layout you checked for the data displays this field from a related table occurrence instead of the layout's table occurrence. You can tell if this is the case by entering layout mode and checking to see if the field's name is preceded by :: to show that it is from a related TO.

          If you can't find any scripted causes, you may want to run a recover on your file. The bright side to file damage being the cause of your problem is that the recover may bring back your missing data.

          Things to keep in mind about Recover:

          1. Recover does not detect all problems
          2. Recover doesn't always fix all problems correctly
          3. Best Practice is to never put a recovered copy back into regular use or development. Instead, replace the damaged file with an undamaged back up copy if this is at all possible. You may have to save a clone of the back up copy and import all data from your recovered copy to get a working copy with the most up to date information possible.