USP_DATAFORMTEMPLATE_VIEW_CONSTITUENTRELATIONSHIPMAPEXPRESSION
The load procedure used by the view dataform template "Constituent Relationship Map Expression View Form"
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | nvarchar(100) | 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. |
@CONSTITUENTNAME | nvarchar(255) | INOUT | Constituent name |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_VIEW_CONSTITUENTRELATIONSHIPMAPEXPRESSION
(
@ID nvarchar(100),
@DATALOADED bit = 0 output,
@CONSTITUENTNAME nvarchar(255) = null output
)
as
set nocount on;
set @DATALOADED = 0;
if len(@ID) > 36
begin
set @ID = substring(@ID, 38, 73);
end;
select @DATALOADED = 1,
@CONSTITUENTNAME = NF.NAME
from dbo.CONSTITUENT
outer apply dbo.UFN_CONSTITUENT_DISPLAYNAME(CONSTITUENT.ID) NF
where ID = @ID;
return 0;