USP_DATAFORM_EDITLOAD_STEWARDSHIPPLANTEMPLATE
The load procedure used by the edit dataform template "Stewardship Plan Template Edit Form"
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | uniqueidentifier | IN | The input ID parameter used to load the fields defined on the form. |
@NAME | nvarchar(100) | INOUT | Template name |
@STEPS | xml | INOUT | |
@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. |
@CURRENTAPPUSERID | uniqueidentifier | IN | Input parameter indicating the ID of the current user. |
@SITEREQUIRED | bit | INOUT | Site required |
@SITES | xml | INOUT | Sites |
Definition
Copy
CREATE procedure dbo.USP_DATAFORM_EDITLOAD_STEWARDSHIPPLANTEMPLATE
(
@ID uniqueidentifier,
@NAME nvarchar(100) = null output,
@STEPS xml = null output,
@DATALOADED bit = 0 output,
@TSLONG bigint = 0 output,
@CURRENTAPPUSERID uniqueidentifier = null,
@SITEREQUIRED bit = null output,
@SITES xml = null output
)
as begin
set nocount on;
set @DATALOADED = 0;
set @TSLONG = 0;
select
@DATALOADED = 1,
@NAME = STEWARDSHIPPLANTEMPLATE.NAME,
@STEPS = dbo.UFN_STEWARDSHIPPLANTEMPLATE_STEPS_TOITEMLISTXML(STEWARDSHIPPLANTEMPLATE.ID),
@SITEREQUIRED = dbo.UFN_SITEREQUIREDFORUSER(@CURRENTAPPUSERID),
@SITES = dbo.UFN_STEWARDSHIPPLANTEMPLATE_GETSITES_TOITEMLISTXML(STEWARDSHIPPLANTEMPLATE.ID)
from
dbo.STEWARDSHIPPLANTEMPLATE
where STEWARDSHIPPLANTEMPLATE.ID = @ID;
return 0;
end;