USP_DATAFORMTEMPLATE_VIEW_ENTERREQUESTSBYSTUDENT

The load procedure used by the view dataform template "Enter requests by student"

Parameters

Parameter Parameter Type Mode Description
@CURRENTAPPUSERID uniqueidentifier IN Input parameter indicating the ID of the current user.
@DATALOADED bit INOUT Output parameter indicating whether or not data was actually loaded.
@SESSIONID uniqueidentifier INOUT SESSIONID
@HEADER nvarchar(200) INOUT HEADER
@STUDENTRECORDTYPEID uniqueidentifier INOUT STUDENTRECORDTYPEID
@SCHOOLID uniqueidentifier INOUT SCHOOLID
@STUDENTS xml INOUT STUDENTS

Definition

Copy


CREATE procedure dbo.USP_DATAFORMTEMPLATE_VIEW_ENTERREQUESTSBYSTUDENT
(
    @CURRENTAPPUSERID uniqueidentifier,
    @DATALOADED bit = 0 output,
    @SESSIONID uniqueidentifier = null output,
    @HEADER nvarchar(200) = null output,
    @STUDENTRECORDTYPEID uniqueidentifier = null output,
    @SCHOOLID uniqueidentifier = null output,
    @STUDENTS xml = null output
)
as
    set nocount on;

    -- be sure to set this, in case the select returns no rows

    set @DATALOADED = 1;

    select
        @SESSIONID = SESSIONID,
        @HEADER = HEADER,
        @SCHOOLID = SCHOOLID
    from dbo.UFN_APPUSERSESSION_GETHEADERTEXT(@CURRENTAPPUSERID)

    select @STUDENTRECORDTYPEID = ID from dbo.RECORDTYPE where upper(NAME) = 'STUDENT';
    select @STUDENTS = dbo.UFN_SESSION_GETSTUDENTS_TOITEMLISTXML(@SESSIONID, @SCHOOLID)

    return 0;