USP_DATAFORMTEMPLATE_VIEW_INVITEEPAGEEXPRESSION

The load procedure used by the view dataform template "Invitee Page Expression 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.
@EVENTID uniqueidentifier INOUT EVENTID
@ISMAINEVENT bit INOUT ISMAINEVENT
@HASAPPEAL bit INOUT HASAPPEAL
@NAME nvarchar(100) INOUT NAME

Definition

Copy


                CREATE procedure dbo.USP_DATAFORMTEMPLATE_VIEW_INVITEEPAGEEXPRESSION
                (
                    @ID uniqueidentifier,
                    @DATALOADED bit = 0 output,
                    @EVENTID uniqueidentifier = null output,
                    @ISMAINEVENT bit = null output,
                    @HASAPPEAL bit = null output,
                    @NAME nvarchar(100) = null output
                )
                as
                    set nocount on;

                    set @DATALOADED = 0;

                    select 
                        @DATALOADED = 1,
                        @EVENTID = EVENT.ID,
                        @ISMAINEVENT = 
                            case
                                when exists
                                (
                                    select
                                        ID
                                    from
                                        dbo.EVENT SUPPORTINGEVENT
                                    where
                                        SUPPORTINGEVENT.MAINEVENTID = EVENT.ID
                                )
                                then
                                    1
                                else
                                    0
                            end,
                        @HASAPPEAL =
                            case
                                when EVENT.APPEALID is null then 0
                                else 1
                            end,                            
                        @NAME = EVENT.NAME
                    from
                        dbo.EVENT
                    where
                        ID = @ID;

                    return 0;