USP_DATAFORMTEMPLATE_VIEW_EVENT_ISSINGLE

The load procedure used by the view dataform template "Event Is Single View 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.
@ISSINGLE bit INOUT ISSINGLE

Definition

Copy


CREATE procedure dbo.USP_DATAFORMTEMPLATE_VIEW_EVENT_ISSINGLE
(
    @ID uniqueidentifier,
    @DATALOADED bit = 0 output,
    @ISSINGLE bit = null output
)
as
    set nocount on;

    set @DATALOADED = 1;
    set @ISSINGLE = 0;

    if (select MAINEVENTID from dbo.EVENT where EVENT.ID = @ID) is null
        if (select count(ID) from dbo.EVENT where EVENT.MAINEVENTID = @ID) = 0
            set @ISSINGLE = 1;

    return 0;