Primary Key Field Type
 ID uniqueidentifier

Field Field Type Null Notes Description
 NAME nvarchar(255)   Default = '' Name of the KPI spec.
 DESCRIPTION nvarchar(1000)   Default = '' Description of the KPI spec.
 GOALVALUE decimal(19, 5)   Default = 0 Goal for the KPI represented by a whole number.
 GOALINDICATORTYPECODE tinyint   Default = 0 Determines how the goal progress is rendered in the UI.
 GOALAIMTYPECODE tinyint   Default = 0 The direction in which the trend should ideally go.
 GOALUPWARDLOWVALUE decimal(20, 4)   Default = 0
 GOALUPWARDMIDVALUE decimal(20, 4)   Default = 0
 GOALDOWNWARDMIDVALUE decimal(20, 4)   Default = 0
 GOALDOWNWARDHIGHVALUE decimal(20, 4)   Default = 0
 PARAMETERSXML xml Data form item which represents the parameters for the KPI instance.
 HISTORYTYPECODE tinyint   Default = 0 Method for archiving past KPI instance values.
 NUMBEROFITEMSTOSTORE int   Default = 0 Number of KPI instance values to archive.
 CONTEXTRECORDID nvarchar(100)   Default = '' ID of the context record associated with this KPI instance.
 DATEADDED datetime   Default = getdate() Indicates the date this record was added.
 DATECHANGED datetime   Default = getdate() Indicates the date this record was last changed.
 TS timestamp   Timestamp.
 TSLONG bigint (Computed) CONVERT(bigint, TS) Numeric representation of the timestamp.
 GOALINDICATORTYPE nvarchar(13) (Computed) CASE [GOALINDICATORTYPECODE] WHEN 0 THEN N'Road sign' WHEN 1 THEN N'Thermometer' WHEN 2 THEN N'Traffic light' END Provides a translation for the 'GOALINDICATORTYPECODE' field.
 GOALAIMTYPE nvarchar(4) (Computed) CASE [GOALAIMTYPECODE] WHEN 0 THEN N'Up' WHEN 1 THEN N'Down' END Provides a translation for the 'GOALAIMTYPECODE' field.
 HISTORYTYPE nvarchar(20) (Computed) CASE [HISTORYTYPECODE] WHEN 0 THEN N'Save all values' WHEN 1 THEN N'Save last <N> values' END Provides a translation for the 'HISTORYTYPECODE' field.
 SITEFILTERENABLEDFORINSTANCE bit   Default = 0 Indicates whether this KPI instance should have site filtering applied for it.

Foreign Key Field Type Null Notes Description
 KPICATALOGID uniqueidentifier   KPICATALOG.ID ID of the KPI to which this record is associated.
 ADDEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.
 CHANGEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.
 STATUSCHANGEDALERTID uniqueidentifier ALERTTYPE.ID FK to ALERTTYPE. Represents the alert associated with this KPI when the status changes.

Index Name Field(s) Unique Primary Clustered
 IX_KPIINSTANCE_CONTEXTRECORDID CONTEXTRECORDID      
 IX_KPIINSTANCE_DATEADDED DATEADDED    
 IX_KPIINSTANCE_DATECHANGED DATECHANGED      
 IX_KPIINSTANCE_KPICATALOGID KPICATALOGID      
 PK_KPIINSTANCE ID  
 UC_KPIINSTANCE_NAME NAME    
 UIX_KPIINSTANCE_STATUSCHANGEDALERTID STATUSCHANGEDALERTID    

Trigger Name Description
 TR_KPIINSTANCE_AUDIT_UPDATE
 TR_KPIINSTANCE_AUDIT_DELETE

Referenced by Field
 KPIDASHBOARDPAGETABKPIINSTANCE KPIINSTANCEID
 KPIINSTANCEHISTORY KPIINSTANCEID
 KPIINSTANCEMILESTONE KPIINSTANCEID
 KPIINSTANCESITE KPIINSTANCEID
 KPIINSTANCESTATUS PARAMETERSETID
 KPIINSTANCESTATUSHISTORY KPIINSTANCEID
 SYSTEMROLEKPIINSTANCE KPIINSTANCEID

Entity-Relationship diagram of this table