USP_DATAFORMTEMPLATE_VIEW_BBNCCONSTITEDUCATIONATTRIBUTEDATA

The load procedure used by the view dataform template "NetCommunity Constituent Education Attribute Data 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.
@ATTRIBUTES xml INOUT ATTRIBUTES

Definition

Copy


                CREATE procedure dbo.USP_DATAFORMTEMPLATE_VIEW_BBNCCONSTITEDUCATIONATTRIBUTEDATA
                (
                    @ID uniqueidentifier,
                    @DATALOADED bit = 0 output,
                    @ATTRIBUTES xml = null output
                )
                as
                    set nocount on;
                    set @DATALOADED = 0;

                    declare @BBNCID int;
                    select @BBNCID = [SEQUENCEID] from dbo.CONSTITUENT where [ID] = @ID;

                    select 
                        @DATALOADED = 1,
                        @ATTRIBUTES = 
                            (
                            select
                                [ATTRIBUTETYPEID], 
                                [ATTRIBUTEDATATYPE],
                                [DESCRIPTION]
                            from 
                                dbo.UFN_BBNC_CONSTITPRIMARYALUMNIATTRIBUTEDATA(@BBNCID, 0)
                            for 
                                xml raw('ITEM'),type,elements,root('ATTRIBUTES'),BINARY BASE64
                            );

                    return 0;