USP_DATAFORMTEMPLATE_VIEW_ACTIONITEM

The load procedure used by the view dataform template "Action item detail 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.
@ACTIONITEMSTATUS nvarchar(16) INOUT Action item status
@STARTDATE datetime INOUT Action item initiation date
@ENDDATE datetime INOUT Action item expiration date

Definition

Copy


CREATE procedure dbo.USP_DATAFORMTEMPLATE_VIEW_ACTIONITEM
(
    @ID uniqueidentifier,
    @DATALOADED bit = 0 output,
    @ACTIONITEMSTATUS nvarchar(16) = null output,
    @STARTDATE datetime = null output,
    @ENDDATE datetime = null output
)
as
    set nocount on;

    set @DATALOADED = 0;

    select top 1
    @DATALOADED = 1,
    @ACTIONITEMSTATUS = AI.STATUS,
    @STARTDATE = AI.STARTDATE,
    @ENDDATE = AI.ENDDATE
    from dbo.ADVOCACYACTIVITY (NOLOCK) AA
      INNER JOIN dbo.ACTION_ITEM (NOLOCK) AI ON AA.ACTIONITEMID = AI.ID
    where AA.ID = @ID



    return 0;