Start a new topic

Comparing fields by date

Hey guys,

I would like to know how to access the Category, Description and date of an RE record in the API.

Basically, say I have a column called 'Mailout' in my csv, and an attribute category called 'Mailout' in each record.

If the Attribute Date on Mailout is after a predefined date, I want to overwrite the Mailout cell in the .csv with the Mailout Attribute's description. That way, if the attribute is newer than the .csv, it takes precedence.

 Any help, even pointing me in the right direction for accessing the attribute data, would be appreciated!

 

Thanks!

Bobby.

 

 


Something like this:

Dim oAttribute As Blackbaud.PIA.RE7.BBREAPI.IBBAttribute
Dim oAttrTypesServer As New Blackbaud.PIA.RE7.BBREAPI.CAttributeTypeServer
Dim sDescription As String
Dim sDate As String
Dim sComments As String

oAttrTypesServer.Init(Import.SessionContext) 
For Each oAttribute In oRec.Attributes
If oAttrTypesServer.GetAttributeTypeDescription(oAttribute.Fields(EAttributeFields.Attribute_fld_ATTRIBUTETYPES_ID)) = "Mailout" Then
sDescription = oAttribute.Fields(EAttributeFields.Attribute_fld_VALUE)
sDate = oAttribute.Fields(EAttributeFields.Attribute_fld_ATTRIBUTEDATE)
sComments = oAttribute.Fields(EAttributeFields.Attribute_fld_COMMENTS) 
End If
Next

Awesome! Thanks very much, that's a great help. I'll give it a go
Login or Signup to post a comment