USP_DATAFORMTEMPLATE_EDITLOAD_TEAM_EXTENSION
The load procedure used by the edit dataform template "Team Extension Edit 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. |
@TEAMFUNDRAISINGTEAMID | uniqueidentifier | INOUT | Team |
@EVENTID | uniqueidentifier | INOUT | Event |
@PARTICIPANTGOAL | int | INOUT | Total Participant Goal |
@TEAMMEMBERGOAL | int | INOUT | Teammember Retention Goal |
@VOLUNTEERGOAL | int | INOUT | Total Volunteer Recruitment Goal |
@COMMUNICATIONGOAL | int | INOUT | Communication Goal |
@OTHERGOAL | int | INOUT | Custom Goal |
@PCTTEAMMEMBERRETENSION | decimal(5, 2) | INOUT | Percentage of Team Members to retain |
@TEAMRECRUITMENTGOAL | int | INOUT | Total number of Teams in a Company |
@PCTTEAMSRETENSION | decimal(5, 2) | INOUT | Percentage of Teams to retain in a Company |
@STATUSCODE | tinyint | INOUT | Status |
@FAFFUNDRAISINGGAUGEID | uniqueidentifier | INOUT | FafFundraisingGaugeID |
@TYPECODE | tinyint | INOUT | Type |
@HOUSEHOLDID | uniqueidentifier | INOUT | Household |
@TARGETFUNDRAISINGGOAL | money | INOUT | TargetFundraisingGoal |
@DONORRETENTIONGOAL | decimal(5, 2) | INOUT | DonorRetentionGoal |
@TEAMCONSTITUENTID | uniqueidentifier | INOUT | TeamConstituentid |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDITLOAD_TEAM_EXTENSION
(
@ID uniqueidentifier,
@DATALOADED bit = 0 output,
@TSLONG bigint = 0 output,
@TEAMFUNDRAISINGTEAMID uniqueidentifier = null output,
@EVENTID uniqueidentifier = null output,
@PARTICIPANTGOAL int = null output,
@TEAMMEMBERGOAL int = null output,
@VOLUNTEERGOAL int = null output,
@COMMUNICATIONGOAL int = null output,
@OTHERGOAL int = null output,
@PCTTEAMMEMBERRETENSION decimal(5,2) = null output,
@TEAMRECRUITMENTGOAL int = null output,
@PCTTEAMSRETENSION decimal(5,2) = null output,
@STATUSCODE tinyint = null output,
@FAFFUNDRAISINGGAUGEID uniqueidentifier = null output,
@TYPECODE tinyint = null output,
@HOUSEHOLDID uniqueidentifier = null output,
@TARGETFUNDRAISINGGOAL money = null output,
@DONORRETENTIONGOAL decimal(5,2) = null output,
@TEAMCONSTITUENTID uniqueidentifier = null output
)
as
set nocount on;
-- be sure to set these, in case the select returns no rows
set @DATALOADED = 0
set @TSLONG = 0
-- populate the output parameters, which correspond to fields on the form. Note that
-- we set @DATALOADED = 1 to indicate that the load was successful. Otherwise, the system
-- will display a "no data loaded" message. Also note that we fetch the TSLONG so that concurrency
-- can be considered.
select
@DATALOADED = 1,
@TSLONG = TSLONG,
@TEAMFUNDRAISINGTEAMID = TEAMFUNDRAISINGTEAMID,
@EVENTID = EVENTID,
@PARTICIPANTGOAL = PARTICIPANTGOAL,
@TEAMMEMBERGOAL = TEAMMEMBERGOAL,
@VOLUNTEERGOAL = VOLUNTEERGOAL,
@COMMUNICATIONGOAL = COMMUNICATIONGOAL,
@OTHERGOAL = OTHERGOAL,
@PCTTEAMMEMBERRETENSION = PCTTEAMMEMBERRETENSION,
@TEAMRECRUITMENTGOAL = TEAMRECRUITMENTGOAL,
@PCTTEAMSRETENSION = PCTTEAMSRETENSION,
@STATUSCODE = STATUSCODE,
@FAFFUNDRAISINGGAUGEID = FAFFUNDRAISINGGAUGEID,
@TYPECODE = TYPECODE,
@HOUSEHOLDID = HOUSEHOLDID,
@TARGETFUNDRAISINGGOAL = TARGETFUNDRAISINGGOAL,
@DONORRETENTIONGOAL = DONORRETENTIONGOAL,
@TEAMCONSTITUENTID = TEAMCONSTITUENTID
from dbo.TEAMEXTENSION
where ID = @ID
return 0;