Table: dbo.Custom_Value
Columns
NameTypeConstraintsDescription
custom_field_KEYint (4)NOT NULL
row_KEYint (4)NOT NULLContains the key of the record that "owns" this value, like the client or vendor. Will match the related value in the Custom_Value_X table (ex. Custom_Value_Client.client_KEY). Set initially through normal means, but is also maintained via database triggers. The triggers exist to support restoring client data into the database.
custom_valuenvarchar (200)NOT NULL
custom_value_KEYint (4)NOT NULLPrimary key for this table and FK to the custom value being referenced.
custom_grouping_KEYint (4)Link to the custom grouping record if this is for a list field. ["BR"]If value is for a grouping field then the grouping key will match (logically) the value in custom_value; ["BR"]null in this column will be an empty string in custom_value. ["BR"]The grouping key will be null if this is for a non-grouping field, and there will be no relationship between ["BR"]custom_grouping_KEY and custom_value.
Primary key
NameColumnsDescription
PK_Custom_Valuecustom_value_KEY
Foreign keys
NameColumnsReferenced tableDescription
FK_Custom_Value__Custom_Field__custom_field_KEYcustom_field_KEYCustom_Field (custom_field_KEY)
FK_Custom_Value__Custom_Grouping__custom_grouping_KEYcustom_grouping_KEYCustom_Grouping (custom_grouping_KEY)
Incoming foreign keys
NameColumnsReferencing tableDescription
FK_Custom_Value_Staff__Custom_Value__custom_value_KEYcustom_value_KEYCustom_Value_Staff
FK_Custom_Value_Firm__Custom_Value__custom_value_KEYcustom_value_KEYCustom_Value_Firm
FK_Custom_Value_Client__Custom_Value__custom_value_KEYcustom_value_KEYCustom_Value_Client
FK_Custom_Value_Client_Staff__Custom_Value__custom_value_KEYcustom_value_KEYCustom_Value_Client_Staff
FK_Custom_Value_Customer__Custom_Value__custom_value_KEYcustom_value_KEYCustom_Value_Customer
FK_Custom_Value_Vendor__Custom_Value__custom_value_KEYcustom_value_KEYCustom_Value_Vendor
FK_Custom_Value_Employee__Custom_Value__custom_value_KEYcustom_value_KEYCustom_Value_Employee

Schema diagram