Start a new topic

Primary Addressee Field Name

I'm importing gifts into a batch, with constituent IDs in the import file, and I would like to be able to include in the import a gift attribute that is drawn from that constituent's primary addressee.

Which means I need to use the API to call the Primary Addressee so I can use it to create the attribute.  But I don't know what the field name is for the Primary Addressee through the API.

Can anyone help?


You're too kind,Wayne.

In the end, we ended up with two functions:

 

edit: Apparently I can't have two sets of code tags in the same post.  Here's the more interesting function (though it doesn't use Key Indicator).

[code]Public Function ComputedColumn_635826818582027160( _ ByVal oField as ImportOM.API.iField, _ ByVal Cancel As ImportOM.API.iCancel) As String Dim sReturn As String = "" Dim oSpouse As CIndividual Dim oRec As New Blackbaud.PIA.RE7.BBREAPI.CRecord oRec.Init(Import.SessionContext) oRec.LoadByField(ERECORDSFields.RECORDS_fld_CONSTITUENT_ID,Import.Fields.GetByExcelName("A").Value) oRec.Relations.Individuals.Spouse If Not oSpouse Is Nothing Then If oSpouse.Fields(EINDIVIDUALFields.INDIVIDUAL_fld_DECEASED) = -1 Then sReturn = oRec.Fields(ERECORDSFields.RECORDS_fld_PRIMARY_ADDRESSEE) Else sReturn = oRec.Fields(ERECORDSFields.RECORDS_fld_FULL_NAME) End If Else oSpouse = Nothing sReturn = oRec.Fields(ERECORDSFields.RECORDS_fld_FULL_NAME) End If Return sReturn oRec.CloseDown() oRec = Nothing End Function[/code]


1 person likes this
Hi Evan,

I often find that talking it out leads to a solution more quickly even if it's to myself!

For REAPI information, if you are not hosted, you can look in (RE Install Folder)\Help\REObjects.chm

There you will find things like a list of the field enumerations for records.

1 person likes this
I don't love the trial and error it took to get this, but we managed to track down ERECORDSFields.RECORDS_fld_PRIMARY_ADDRESSEE and ERECORDSFields.RECORDS_fld_KEY_INDICATOR, though why ERECORDSFields.RECORDS_fld_KEY_INDICATOR = 2 denotes an individual eludes me. Nothing in the Raiser's Edge files (including RE7Objects and RE7Schema) suggests this is true.

Is there some available resource of which I'm unaware?

 

Edit: Apparently my process is that I complain about not being able to find something, and then I immediately find it.

Sorry about that.

To expand on that question, where can I look up field names? Is there some sort of resource I can use so I'll know how to find the Key Indicator or any other constituent field AfterConstituentOpen?
Login or Signup to post a comment