Run through All Attributes on a constituent record looking for a match
C
Chris DeMaster
started a topic
about 8 years ago
OK, this is probably a pretty basic question, but for the life of me I can not wrap my head around it. I need to search through all the attributes on a constituent record to see if one particular one matches. I am assuming the simplest way to do this is with some sort of Attribute Type Server, but I have been unable to figure out how to set it up properly. Does anyone happen to have some generic code demonstrating that you could share on how this would be done? Or even a better way to go about this?
[code] Dim oAttrTypesServer As New Blackbaud.PIA.RE7.BBREAPI.CAttributeTypeServer oAttrTypesServer.Init(Import.SessionContext) Dim oAttribute As Blackbaud.PIA.RE7.BBREAPI.IBBAttribute Dim lTypeID As Long For Each oAttribute In oRec.Attributes lTypeId = oAttribute.Fields(Blackbaud.PIA.RE7.BBREAPI.EattributeFields.Attribute_fld_ATTRIBUTETYPES_ID) Select Case (oAttrTypesServer.GetAttributeTypeDescription(lTypeId)) Case "The Attribute You Want" ' Do Some stuff Here End Select Next oAttribute [/code]
Chris DeMaster
OK, this is probably a pretty basic question, but for the life of me I can not wrap my head around it. I need to search through all the attributes on a constituent record to see if one particular one matches. I am assuming the simplest way to do this is with some sort of Attribute Type Server, but I have been unable to figure out how to set it up properly. Does anyone happen to have some generic code demonstrating that you could share on how this would be done? Or even a better way to go about this?
Thanks!