Solved

FM - Tracking Changes from an Update Import

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

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…
Problem: You have a hosted FileMaker database and users are tired of having to use Open Remote or Open Recent to access the database. They say, "can't you just give us something to double-click on rather than have to go through those dialogs?" An…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

757 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

21 Experts available now in Live!

Get 1:1 Help Now