A simple way to find an ATTRIBUTETYPESID is to use Microsoft SQL Server Management Studio (SSMS) or another SQL query tool to run an SQL query against the AttributeTypes table in your RE database:
SELECT * FROM AttributeTypes
This will give you a a list of all ATTRIBUTETYPESIDs. To look for a specific ATTRIBUTETYPESID, you can use something like:
SELECT ATTRIBUTETYPESID FROM AttributeTypes WHERE DESCRIPTION = ''
SELECT ATTRIBUTETYPESID FROM AttributeTypes WHERE DESCRIPTION LIKE '%%'
Note: in the examples above, replace "" or "" (including angled brackets, ) with your search criteria.
For more information about the ATTRIBUTETYPES table (and other RE tables and views), refer to The Raiser's Edge Database Reference (RE7Schema.chm).
We have two attributes that hold Volunteer interests. One is the attribute category of SNHUvolunteer and the other is SNHUcan. The descriptions for each hold multiple types of volunteer interests, for example, Resume Critiques, Event Support etc.
We are trying to perform some stuff in API depending on the attribute categories. We can't search for the Attribute value in API because we have so many different values so we wanted to search on category. We are not basing our updates/adds on the description value but rather on the category value.
We found the Blackbaud.PIA.RE7.BBREAPI.EattributeFields.Attribute_fld_ATTRIBUTETYPES_ID by trial and error (we tested for a description that would be found in each of the two different attribute categories and outputted a msgbox with the Attribute_fld_ATTRIBUTETYPES_ID number). We then used that number to test if we had one of the two attributes we were looking for (in a for next loop).
We got it to work and everything's fine but we were wondering if there is an easier way to get the category ID in API? We looked in the c:\program Files (x86)\Blackbaud\The Raisers Edge 7\RE7Objects.chm to see if we could find the ID there but no luck.
Does anyone know a quick way to find the attribute ID for the attribute categories?