CodeTableField Defined

Use the CodeTableField element to create a code table field on the tableCode table fields represent lookup values, and facilitate consistent data entry by allowing staff to choose from a pre-defined list rather than manually type in data. Unlike enum field values, code table values can be modified by the user, and new values may be added to the list. They are implemented as "uniqueidentifier" foreign key fields in the database. Code table field names should end in "CODEID" to reiterate their purpose, as in "SUFFIX1CODEID." (This standard is enforced by the Blackbaud Application Framework.)

<CodeTableField 
Name="CATEGORYCODEID” 
Description="The category for the widget." 
CodeTable="WIDGETCATEGORYCODE"/>

Figure: Sample Widget CodeTableField element

We see in our definition above that code table fields are implemented as foreign key fields in the database. A foreign key identifies a column or a set of columns in one (referencing) table that refers to a column or set of columns in another (referenced) table. So, where does the other referenced code table come from? If you guessed CodeTableSpecs, you would be correct. We will cover CodeTableSpecs in the next section.