DONORCHALLENGE

Stores information pertaining to donor challenges.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
NAME nvarchar(100) Default = '' Name of donor challenge.
TYPECODE tinyint Default = 0 Payment type for challenge.
TYPE nvarchar(14) (Computed) yes CASE [TYPECODE] WHEN 0 THEN N'Match per gift' WHEN 1 THEN N'Lump sum match' END Provides a translation for the 'TYPECODE' field.
DESCRIPTION nvarchar(255) Default = '' Descriptive text about the donor challenge.
STARTDATE datetime Date donor challenge begins.
ENDDATE datetime Date donor challenge ends.
TOTALFUNDS money Default = 0 Amount of funds provided.
PAYPLEDGESWITHIN tinyint Default = 0 Number of units to pay pledges within.
PAYPLEDGESWITHINUNITCODE tinyint Default = 0 Units of time to pay pledges within.
PAYPLEDGESWITHINUNIT nvarchar(6) (Computed) yes CASE [PAYPLEDGESWITHINUNITCODE] WHEN 0 THEN N'Years' WHEN 1 THEN N'Months' END Provides a translation for the 'PAYPLEDGESWITHINUNITCODE' field.
MATCHTYPECODE tinyint Default = 0 Gift amount to use when calculating match amount.
MATCHTYPE nvarchar(27) (Computed) yes CASE [MATCHTYPECODE] WHEN 0 THEN N'Full gift amount' WHEN 1 THEN N'Tax deductible portion only' END Provides a translation for the 'MATCHTYPECODE' field.
MATCHINGFACTOR decimal(5, 2) Default = 0 Default factor at which gifts will be matched.
MATCHTHRESHOLD money Default = 0 Target amount for lump sum matches.
MINGIFTAMOUNT money Default = 0 Minimum gift amount to match.
MAXMATCHPERGIFT money Default = 0 Maximum match amount per matched gift.
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.
PROCESSLASTRUN datetime yes Stores the last time the encumber process was run
STATUSTYPECODE tinyint Default = 0 Gift amount to use when calculating match amount.
STATUSTYPE nvarchar(9) (Computed) yes CASE [STATUSTYPECODE] WHEN 0 THEN N'Open' WHEN 1 THEN N'Fulfilled' END Provides a translation for the 'STATUSTYPECODE' field.
ORGANIZATIONTOTALFUNDS money Default = 0 TOTALFUNDS in the organization currency.
ORGANIZATIONMATCHTHRESHOLD money Default = 0 MATCHTHRESHOLD in the organization currency.
ORGANIZATIONMINGIFTAMOUNT money Default = 0 MINGIFTAMOUNT in the organization currency.
ORGANIZATIONMAXMATCHPERGIFT money Default = 0 MAXMATCHPERGIFT in the organization currency.

Foreign Keys

Foreign Key Field Type Null Notes Description
EXTERNALSPONSORID uniqueidentifier yes CONSTITUENT.LOCALID Constituent record of the external sponsor.
INTERNALSPONSORCODEID uniqueidentifier yes DONORCHALLENGESPONSORCODE.ID Internal sponsor record.
REVENUERECOGNITIONTYPECODEID uniqueidentifier yes REVENUERECOGNITIONTYPECODE.ID Default recognition credit type to use when creating matched gifts.
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
LUMPSUMMATCHREVENUEID uniqueidentifier yes FINANCIALTRANSACTION.ID Revenue record for the matched fund.
SITEID uniqueidentifier yes SITE.ID The site associated with this donor challenge.
BASECURRENCYID uniqueidentifier yes CURRENCY.ID The base currency associated with this donor challenge.
ORGANIZATIONEXCHANGERATEID uniqueidentifier yes CURRENCYEXCHANGERATE.ID FK to CURRENCYEXCHANGERATE

Indexes

Index Name Fields Unique Primary Clustered
IX_DONORCHALLENGE_DATEADDED DATEADDED yes
IX_DONORCHALLENGE_DATECHANGED DATECHANGED
IX_DONORCHALLENGE_EXTERNALSPONSORID EXTERNALSPONSORID
IX_DONORCHALLENGE_LUMPSUMMATCHREVENUEID LUMPSUMMATCHREVENUEID
PK_DONORCHALLENGE ID yes yes
UC_DONORCHALLENGE_NAME NAME yes

Triggers

Trigger Name Description
TR_DONORCHALLENGE_INSERTUPDATE_CURRENCY
TR_DONORCHALLENGE_AUDIT_UPDATE
TR_DONORCHALLENGE_AUDIT_DELETE

Referenced by

Referenced by Field
DONORCHALLENGEATTACHMENT DONORCHALLENGEID
DONORCHALLENGEDESIGNATIONMAP DONORCHALLENGEID
DONORCHALLENGEENCUMBERED DONORCHALLENGEID
DONORCHALLENGEEXCLUDEDAPPLICATIONTYPE DONORCHALLENGEID
DONORCHALLENGEMEDIALINK DONORCHALLENGEID
DONORCHALLENGEMEMBERSHIPLEVELMAP DONORCHALLENGEID
DONORCHALLENGENOTE DONORCHALLENGEID
DONORCHALLENGESPLIT DONORCHALLENGEID