WPSEARCHHISTORY

Contains a record of each WealthPoint search.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
REQUESTID int Default = 0 Indicates the WealthPoint Search Request ID.
DATESUBMITTED datetime yes Date request was submitted to WealthPoint.
DATESTARTED datetime yes Date WealthPoint Search was started.
DATEREADY datetime yes Date WealthPoint Search results were ready.
DATERETRIEVED datetime yes Indicates the date when the results of the WealthPoint Search have been retrieved from WealthPoint
STATUSCODE tinyint Default = 0 Status of the WealthPoint Search request.
STATUSDETAILS nvarchar(500) Default = '' Details of the status of the WealthPoint search request.
PARSING bit Default = 0 Indicates that a WealthPoint search request is being parsed.
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) yes CONVERT(bigint, TS) Numeric representation of the timestamp.
JOBID nvarchar(50) Default = '' Indicates the WealthPoint Search Job ID.
SEARCHTYPECODE tinyint Default = 0 Used to indicate the type of search.
RECORDCOUNT int Default = 0 Number of records in search
STATUS nvarchar(13) (Computed) yes CASE [STATUSCODE] WHEN 0 THEN N'Created' WHEN 1 THEN N'Pending' WHEN 2 THEN N'Results ready' WHEN 3 THEN N'Completed' WHEN 4 THEN N'Failed' WHEN 5 THEN N'Canceled' END Provides a translation for the 'STATUSCODE' field.
SECURITIES_REFRESHDATE datetime yes As of this search, the last time that Thomson Financial was refreshed.
NPA_REFRESHDATE datetime yes As of this search, the last time that Guidestar was refreshed.
PF_REFRESHDATE datetime yes As of this search, the last time that Guidestar was refreshed.
BO_REFRESHDATE datetime yes As of this search, the last time that Dun and Bradstreet was refreshed.
BIO_REFRESHDATE datetime yes The last time that Marquis Who's Who was refreshed.
SEARCHTYPE nvarchar(21) (Computed) yes CASE [SEARCHTYPECODE] WHEN 0 THEN N'Constituent' WHEN 1 THEN N'Research Group' WHEN 2 THEN N'Rescreen' WHEN 3 THEN N'Selected Constituents' END
REQUESTEDDATASOURCES nvarchar(250) Default = ''

Foreign Keys

Foreign Key Field Type Null Notes Description
APPUSERID uniqueidentifier yes APPUSER.ID AppUser ID for the user who initiated the WealthPoint Search.
CONSTITUENTID uniqueidentifier yes CONSTITUENT.LOCALID ID of the individual constituent being searched on.
RESEARCHGROUPID uniqueidentifier yes RESEARCHGROUP.ID ID of the research group being searched on.
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.

Indexes

Index Name Fields Unique Primary Clustered
IX_WPSEARCHHISTORY_CONSTITUENTID CONSTITUENTID
IX_WPSEARCHHISTORY_DATEADDED DATEADDED yes
IX_WPSEARCHHISTORY_DATECHANGED DATECHANGED
PK_WPSEARCHHISTORY ID yes yes

Triggers

Trigger Name Description
TR_WPSEARCHHISTORY_AUDIT_UPDATE
TR_WPSEARCHHISTORY_AUDIT_DELETE

Referenced by

Referenced by Field
WPINCOMECOMPENSATION_WPSEARCHHISTORY WPSEARCHHISTORYID
WPPARSINGERROR WPSEARCHHISTORYID
WPREALESTATE_WPSEARCHHISTORY WPSEARCHHISTORYID
WPSEARCHHISTORYSELECTEDCONSTITUENT WPSEARCHHISTORYID