USP_DATAFORMTEMPLATE_EDITLOAD_BATCH2FIELDOPTIONS

The load procedure used by the edit dataform template "Batch Field Options 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.
@CUSTOMBATCH bit INOUT Custom batch
@BATCHFIELDS xml INOUT Batch fields
@BATCHTYPECATALOGID uniqueidentifier INOUT Batch template id
@CREATECUSTOMBATCH bit INOUT Create custom batch
@BATCHTEMPLATEID uniqueidentifier INOUT Batch Template Id
@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.
@TEMPLATEUSECODE int INOUT
@BATCHTEMPLATEFIELDS xml INOUT

Definition

Copy

CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDITLOAD_BATCH2FIELDOPTIONS(
@ID uniqueidentifier,
@DATALOADED bit = 0 output,
@CUSTOMBATCH bit = null output,
@BATCHFIELDS xml = null output,
@BATCHTYPECATALOGID uniqueidentifier = null output,
@CREATECUSTOMBATCH bit = null output,
@BATCHTEMPLATEID uniqueidentifier = null output,
@TSLONG bigint = 0 output,
@TEMPLATEUSECODE int = null output,
@BATCHTEMPLATEFIELDS xml = null output
)
as
begin
    set nocount on;

    set @DATALOADED = 0
    set @TSLONG = 0

    select
        @DATALOADED = 1,
        @BATCHFIELDS = BATCH.FORMDEFINITIONXML, 
        @CUSTOMBATCH = BATCHTEMPLATE.CUSTOM,
        @BATCHTYPECATALOGID = BATCHTEMPLATE.BATCHTYPECATALOGID,
        @BATCHTEMPLATEID = BATCHTEMPLATE.ID,
        @TSLONG = BATCH.TSLONG,
        @TEMPLATEUSECODE = BATCHTEMPLATE.TEMPLATEUSECODE,
        @BATCHTEMPLATEFIELDS = BATCHTEMPLATE.FORMDEFINITIONXML
    from dbo.BATCH     
    inner join dbo.BATCHTEMPLATE on BATCH.BATCHTEMPLATEID = BATCHTEMPLATE.ID
    where BATCH.ID = @ID;    

end