I'm trying to do something probably very similar to what Geraldo did in this thread
I'm a seasoned programmer, but very new to IOM and especially its API. Looks very promissing though.
Basically what I'm trying to do is almost exactly the same thing. We get some gift data from an online source, but would like to match those gifts with existing constituents in RE. This data doesn't have a constituent ID or Import ID, only the outside system id.
We store the "outside system" ID of these donors in an attribute for each donor. PM-COIN ID
I'm attempting to do the same thing where I have a query in RE that pulls all these COIN IDs (outside ID) from the attributes, along with the constituent IDs and last names) and places them into array, which should then be used by IOM to do the matching.
I modified the code he presented in his thread, but I feel like I might be missing something.
I think I'm supposed to assign those array fields to virtual fields, and that's where I need some major handholding.
here's what I have:
Public Overrides Sub BeforeImport(ByVal Cancel As ImportOM.API.iCancel)
'Import has not been started yet
Dim oQuery As New BBREAPI.CQueryObject
Dim queryLength As Long
oQuery.LoadByField(2,"COIN Import IDs")
queryLength = oQuery.QuerySet.NumberOfRecords
Dim queryArray(queryLength,2) As String
RECOINIDs = queryArray
Do While Not oQuery.QuerySet.EOF
RECOINIDs(oQuery.QuerySet.RowNum, 0) = oQuery.QuerySet.fieldValue(1) 'Constituent Specific Attributes PM-COIN ID Description
RECOINIDs(oQuery.QuerySet.RowNum, 1) = oQuery.QuerySet.fieldValue(2) 'Last Name
RECOINIDs(oQuery.QuerySet.RowNum, 2) = oQuery.QuerySet.fieldValue(3) 'Constituent Import ID