USP_DATAFORMTEMPLATE_VIEW_MYPROSPECTRESEARCHPAGEEXPRESSION

The load procedure used by the view dataform template "My Prospect Research Page Expression View"

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.
@CONSTITUENT nvarchar(700) INOUT Constituent
@CURRENTAPPUSERID uniqueidentifier IN Input parameter indicating the ID of the current user.

Definition

Copy


CREATE procedure dbo.USP_DATAFORMTEMPLATE_VIEW_MYPROSPECTRESEARCHPAGEEXPRESSION
(
    @ID uniqueidentifier,
    @DATALOADED bit = 0 output,
    @CONSTITUENT nvarchar(700) = null output,
    @CURRENTAPPUSERID uniqueidentifier
)
as
    set nocount on;

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

    set @DATALOADED = 0;

    select 
        @DATALOADED = 1,
        @CONSTITUENT = NF.NAME + ' - '
    from 
        dbo.APPUSER
        cross apply dbo.UFN_CONSTITUENT_DISPLAYNAME(APPUSER.CONSTITUENTID) NF
    where APPUSER.ID = @CURRENTAPPUSERID

    return 0;