• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 442
  • Last Modified:

FM - Tracking Changes from an Update Import

Thought I could easily track new records added via a Filemaker Import ("Update matching records in found set" and "add new records").  However, our tenants can not only add a record via our website, but they can delete one too.  Thus, my script method of compariing the old vs. the new found record set will not work.  

Am I going to have to export from the current to a a backup database first in the script and then compare records?  Any in the old and not in the current have been deleted and any in the current and not in the old are new records.  Is that the way you all would do it?
0
rvfowler2
Asked:
rvfowler2
  • 2
1 Solution
 
slinkygnCommented:
The way I usually do that is to add a "Deleted" field that marks whether a user "deleted" a record.  I use custom menus to replace the "Delete Record" action with one that runs a script that sets "Deleted" to 1.  I make the user layouts filter out any records with "Deleted" = 1 (either by a scripted find or a portal/relationship trick or such, depending on the application) and that way it looks to the user like they're deleting the record, but the record is actually still visible in the table to admins.

That method has the benefit of also being able to build in "undo" functionality for deletes, but if that's not needed, another simpler way that requires only the custom menu "Delete Record" replacement would be to have a related "deleted records" table, and the scripted delete just creates a record in the "deleted records" table with the serialized record data in it before deleting it from the original table.
0
 
rvfowler2Author Commented:
Currently (and most commonly), I am importing data from a tab delimited file.  I looked once again and see no way that an import can recognize when a record does not exist in the source and so deletes the record.  My current method is to first go to a backup table, delete all records, import all records from the current table, then go back to the current table, delete all records and import all records from the tab delimited file.  I then compare the two tables to check for new or deleted records and flag them.  How would you all do it?  (If it wasn't for the deletions, I could simply do a matching records import and add new records, but I can't do it this way.)
0
 
rvfowler2Author Commented:
Thanks, I like this solution for certain tables where lost info is really damaging.  Thanks.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now