AnsweredAssumed Answered

Import Only Changed Fields

Question asked by AjEGfmTech on Jun 23, 2011
Latest reply on Jun 24, 2011 by Kays

Title

Import Only Changed Fields

Post

Is there a way to match import a CSV of records and ONLY update fields in those records that have different field data from the existing record/field data in the database?

Example
Existing Record...
MemberID = 1234
Email = john@domain.com
Email_ModifyTimestamp = 06/23/2011 07:05:15 PM
Store = Water St
Store_ModifyTimestamp = 06/23/2011 07:05:15 PM

Imported CSV Record...
MemberID (match field) = 1234
Email = john@domain.com
Store = London Rd

Resulting Record after import...
MemberID = 1234
Email = john@domain.com
Email_ModifyTimestamp = 06/23/2011 07:05:15 PM
Store = London Rd
Store_ModifyTimestamp = 06/23/2011 07:21:37 PM

My goal is to have a calculation field like below, for every potentially changing field in the database, that will let me see what field data is being updated after weekly imports.

Evaluate ( "Get ( CurrentHostTimeStamp )" ; [Email] )
/* Field calculation results in the current time stamp of the machine  hosting the FM database only IF the field in brackets changes. Note: the  evaluated field(s) MUST be in brackets. */

Currently every record and field is showing updated timestamps after CSV import. I presume this is because I have a 95,000 record database with sequential ID's and I'm importing a 95,000 record CSV with the same/matching sequential ID's. Therefore it seems that every record is getting overwritten with the imported record/field data, whether the existing record/field data is the same or not.

I'm hoping someone can shed some light on this. I've been searching this forum for answers and see some possible solutions with validating on import and possibly setting variables in the process. The tricky thing for me is how to evaulate an existing field's data with the matching record importing field data. I would basically like to have a calculation/evaluation that would say "If imported field data equals existing field data, skip field" - I don't know if that is how Filemaker could/should work for this situation?

Any help/direction would be greatly appreciated.

Outcomes