USP_DATAFORMTEMPLATE_EDITLOAD_TEAMEXTENSION
The load procedure used by the edit dataform template "FAFEventTeamExtension 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. |
@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(6, 2) | INOUT | Percentage of Team Members to retain |
@TEAMRECRUITMENTGOAL | int | INOUT | Total number of Teams in a Company |
@PCTTEAMSRETENSION | decimal(6, 2) | INOUT | Percentage of Teams to retain in a Company |
@TARGETFUNDRAISINGGOAL | money | INOUT | TargetFundraisingGoal |
@DONORRETENTIONGOAL | decimal(6, 2) | INOUT | DonorRetentionGoal |
@GROUPCURRENTGOAL | money | INOUT | GroupCurrentGoal |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDITLOAD_TEAMEXTENSION
(
@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(6,2) = null output,
@TEAMRECRUITMENTGOAL int = null output,
@PCTTEAMSRETENSION decimal(6,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(6,2) = null output,
--@TEAMCONSTITUENTID uniqueidentifier = null output
@GROUPCURRENTGOAL money = 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 = TE.TSLONG,
@TEAMFUNDRAISINGTEAMID = TE.TEAMFUNDRAISINGTEAMID,
@EVENTID = TE.EVENTID,
@PARTICIPANTGOAL = TE.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
@GROUPCURRENTGOAL = TFT.GOAL
from dbo.TEAMEXTENSION TE, TEAMFUNDRAISINGTEAM TFT
where TE.TEAMFUNDRAISINGTEAMID=TFT.ID
and TE.TEAMFUNDRAISINGTEAMID = @ID
return 0;