USP_DATAFORMTEMPLATE_EDITLOAD_DONORLIFECYCLECRITERIA
The load procedure used by the edit dataform template "Donor Lifecycle Criteria Edit Data Form"
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | uniqueidentifier | IN | The input ID parameter used to load the fields defined on the form. |
@DATALOADED | bit | INOUT | Output parameter indicating whether or not data was actually loaded. |
@TSLONG | bigint | INOUT | Output parameter indicating the TSLONG value of the record being edited. This is used to manage multi-user concurrency issues when multiple users access the same record. |
@DONORPERIOD | int | INOUT | Number of years |
@DONORASOFDATE | datetime | INOUT | As of date |
@MIDLEVELDONORGIFTAMOUNT | int | INOUT | Mid-level donor amount |
@USECONSECUTIVELOYALYEARS | bit | INOUT | Constituents with revenue activity within the specified number of consecutive years are 'Loyal donors' |
@CONSECUTIVELOYALYEARS | int | INOUT | Number of years |
@USEMULTIPLELOYALYEARS | bit | INOUT | Constituents with revenue activity within the specified number of years in a defined range are 'Loyal donors' |
@LOYALDONORMULTIYEARVALUE | int | INOUT | out of the past |
@LOYALDONORMULTIYEARRANGE | int | INOUT | |
@DONORFILTERTYPECODE | int | INOUT | DONORFILTERTYPECODE |
@CONSIDERRECOGNITION | bit | INOUT | Consider recognition credits when calculating revenue |
@ORGANIZATIONCURRENCYID | uniqueidentifier | INOUT | Organization currency ID |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDITLOAD_DONORLIFECYCLECRITERIA
(
@ID uniqueidentifier,
@DATALOADED bit = 0 output,
@TSLONG bigint = 0 output,
@DONORPERIOD int = null output,
@DONORASOFDATE datetime = null output,
@MIDLEVELDONORGIFTAMOUNT int = null output,
@USECONSECUTIVELOYALYEARS bit = null output,
@CONSECUTIVELOYALYEARS int = null output,
@USEMULTIPLELOYALYEARS bit = null output,
@LOYALDONORMULTIYEARVALUE int = null output,
@LOYALDONORMULTIYEARRANGE int = null output,
@DONORFILTERTYPECODE int = null output,
@CONSIDERRECOGNITION bit = null output,
@ORGANIZATIONCURRENCYID uniqueidentifier = null output
)
as
set nocount on;
set @DATALOADED = 0
set @TSLONG = 0
select
@DATALOADED = 1,
@DONORPERIOD = DONORPERIOD,
@DONORASOFDATE = DONORASOFDATE,
@MIDLEVELDONORGIFTAMOUNT = MIDLEVELDONORGIFTAMOUNT,
@USECONSECUTIVELOYALYEARS = USECONSECUTIVELOYALYEARS,
@CONSECUTIVELOYALYEARS = CONSECUTIVELOYALYEARS,
@USEMULTIPLELOYALYEARS = USEMULTIPLELOYALYEARS,
@LOYALDONORMULTIYEARVALUE = LOYALDONORMULTIYEARVALUE,
@LOYALDONORMULTIYEARRANGE = LOYALDONORMULTIYEARRANGE,
@DONORFILTERTYPECODE = DONORFILTERTYPECODE,
@CONSIDERRECOGNITION = CONSIDERRECOGNITION,
@ORGANIZATIONCURRENCYID = dbo.UFN_CURRENCY_GETORGANIZATIONCURRENCY(),
@TSLONG = TSLONG
from
dbo.REVENUELIFECYCLECRITERIA
where
ID = @ID
return 0;