Start a new topic

Max of Gift Date

I am merging two large databases, and I need IOM to help me match up the last of it. When importing, I want to keep the address information for each record from the database in which it has the most recent transaction. Now, I can easily identify the MaxOfDate from either database, but I can't match constituents between the databases without IOM's help.

Is there any way to get IOM, as it presents match options, to display the Last Gift Date from RE, or a field from the import file that I'm not importing (MaxOfTransaction Date)?

Which address I accept (either the one I'm importing or the one already in RE) will be determined by which one has seen the most recent activity. Can IOM help me with this?

That's really the exciting thing about IOM in my opinion. With the API you can really do anything you want!

For all of the headaches that RE's flexibility gives us it does allow you to get creative at times :)
I've been using RE for 15 years, but IOM for only 3 weeks. I've gone from an environment I know extremely well to one I know not at all. It's disconcerting.

This doesn't look like an intended feature of IOM, I must admit (which explains why I find no mention of it in the documentation). But that's okay. I'm an expert at using RE in ways Blackbaud never intended; there's no reason I can't do the same with IOM. Thanks again.
Don't feel like an idiot! This is a complicated process.

To not import anything you want to set the following things:
Constituents->(un-check all of the boxes at the top about automatically changing bio information)
Constituents->Do not add new constituents (check this)
Addresses->Always Ignore new address information (check this)
Addresses->Phones/Emails->Ignore new value (check this if you have emails/phones in the import)

Then to export the matched ids:
Output->Files->Include the Import ID of all matched or added Constituents in the output file (check this!)

Then you just need to make sure that you have the output file path pointed to somewhere you can find and you should be all set!
Okay, I feel like an idiot. How do I run the import so that it produces the output file, but doesn't import the records?
Thank, Wayne. Option 2 will certainly work. Option 1 is more elegant, but I can probably get Option 2 done faster.

That's terrific. Thanks a bunch.

My best idea so far was to populate some field in RE with the Last Gift Date and then put that in my duplicate criteria so that it would be displayed on screen during the matching. Yours are better.
?

Hello Evan,

If I understand correctly you do not want to import the address into RE unless the last gift date from the old DB is after the last gift date currently in RE.  

Option 1) Is to set up the profile to import all of the addresses and use the API to check the dates and delete the address information if you do not want to import that one.

Assuming that you have a (simplified) import file with the columns:
Name
Address (would be multiple columns in reality)
olddbLastGiftDate (date of last gift from old DB)

Below I have included some (untested) code to check the last gift date in RE and delete the address lines if the oldDB date is before the current one.

Option 2)  Would be to set up the IOM profile to not import any addresses but to output the importID of all of the matched constituents.  Then, using the new list of IDs you can use RE query to get their last gift dates and use Excel to match up & compare the dates to make a clean file with only the addresses that you want to import.



**DISCLAIMER**  I HAVE NOT TESTED THIS!  There are a few areas that will need attention as I have noted in the code.

Public Overrides Sub AfterConstituentOpen(ByVal oRec As Blackbaud.PIA.RE7.BBREAPI.CRecord, ByVal Cancel As ImportOM.API.iCancel)

MyBase.AfterConstituentOpen(oRec, Cancel)
' Get the RE last gift date and check it against the incoming last gift date
' If the RE date is more recent then do not import the new address, otherwise do
' Get the Last Gift from the current RE Record
Dim oLastGift As New blackbaud.PIA.RE7.BBREAPI.CGiftClass
With oLastGift
.Init(Import.SessionContext)
' **NOTE** this might fail if there is not a last gift so you should probably put in some error checking
.Load(oRec.Fields(Blackbaud.PIA.RE7.BBREAPI.ERECORDSFields.RECORDS_fld_LAST_GIFT))
End With
' Get the Date of the Last Gift from the current record
Dim reLastGiftDate As String = oLastGift.Fields(Blackbaud.PIA.RE7.BBREAPI.EGiftFields.GIFT_fld_Date)
' If the imported date is less than the date of the current RE Last Gift then remove the address data so that it will not import
' **NOTE** you will probably need to figure out how to compare dates as this is just comparing the string values.
If Import.Fields.GetByName("olddbLastGiftDate").Value
' If the imported date is older then remove the address fields from the import
'  **NOTE** you will have to do this for all of your address lines in the import file
Import.Fields.GetByName("Address").Value = ""
End If
'  Cleanup the gift object
oLastGift.CloseDown()
oLastGift = Nothing
End Sub
Login or Signup to post a comment