Solved

FM - Tracking Changes from an Update Import

Posted on 2014-04-08
3
396 Views
Last Modified: 2014-04-17
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
Comment
Question by:rvfowler2
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
slinkygn earned 500 total points
ID: 39986679
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
 
LVL 2

Author Comment

by:rvfowler2
ID: 39986878
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
 
LVL 2

Author Closing Comment

by:rvfowler2
ID: 40007228
Thanks, I like this solution for certain tables where lost info is really damaging.  Thanks.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Conversion Steps for merging and consolidating separate Filemaker files The following is a step-by-step guide for the process of consolidating two or more FileMaker files (version 7 and later) into a single file with multiple tables. Sometimes th…
Having just upgraded from Filemaker 11 to Filemaker 12 over the weekend, we thought we would add some tips for others making the same move.  In general, our installation went without incident. Please note that this is not a replacement for Chapter 5…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question