USP_DATAFORMTEMPLATE_ADD_USERDEFINEDELEMENT_PRELOAD

The load procedure used by the edit dataform template "User-defined Element Add Data Form"

Parameters

Parameter Parameter Type Mode Description
@ACCOUNTSTRUCTUREID uniqueidentifier IN Input parameter indicating the context ID for the record being added.
@ELEMENTNAME nvarchar(100) INOUT Element Name
@ELEMENTLENGTH int INOUT

Definition

Copy


CREATE procedure dbo.USP_DATAFORMTEMPLATE_ADD_USERDEFINEDELEMENT_PRELOAD
(
    @ACCOUNTSTRUCTUREID uniqueidentifier,
    @ELEMENTNAME nvarchar(100) = null output,
    @ELEMENTLENGTH integer = null output
)
as
    set nocount on;

    select 
        @ELEMENTNAME=DESCRIPTION,
        @ELEMENTLENGTH = (case LENGTH when 0 then 100 else LENGTH end)
    from dbo.PDACCOUNTSTRUCTURE 
    where ID = @ACCOUNTSTRUCTUREID

    return 0;