Solved

FM - Tracking Changes from an Update Import

Posted on 2014-04-08
3
378 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
FM - Problem Importing from Table to Table via Scheduled Script 12 309
Filemaker import xml 3 164
Filemaker using sql database 5 59
printing table occurances in filemaker pro 10 8 39
Pop up windows can be a useful feature of any Filemaker database.  Though best used sparingly, they can be employed in a multitude of different ways, for example;  as a splash screen at login, during scripted processes to control user input, as pick…
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…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

863 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

Need Help in Real-Time?

Connect with top rated Experts

28 Experts available now in Live!

Get 1:1 Help Now