USP_DATAFORMTEMPLATE_VIEW_PDACCOUNTSEGMENTMAP
The load procedure used by the view dataform template "Account Segment Map Expression 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. |
@SEGMENTMAPPINGTYPE | nvarchar(11) | INOUT | SEGMENTMAPPINGTYPE |
@DESCRIPTION | nvarchar(60) | INOUT | Description |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_VIEW_PDACCOUNTSEGMENTMAP
(
@ID uniqueidentifier,
@DATALOADED bit = 0 output,
@SEGMENTMAPPINGTYPE nvarchar(11) = null output,
@DESCRIPTION nvarchar(60) = null output
)
as
set nocount on;
-- be sure to set this, in case the select returns no rows
set @DATALOADED = 0;
-- populate the output parameters, which correspond to fields on the form. Note that
-- we set @DATALOADED = 1 to indicate that the load was successful. Otherwise, the system
-- will display a "no data loaded" message.
select
@DATALOADED = 1,
@SEGMENTMAPPINGTYPE = (
case PDACCOUNTTABLESAVAILABLEFORSEGMENTID
when '2C64A221-99F9-46F3-B35B-F3E34A3AA484' then 'EVENT'
when '428D6D21-4482-44E5-A293-6AB5BA085662' then 'APPEAL'
when '4C4A084F-597C-4CDE-BFB6-F1730397A01A' then 'PURPOSE'
when '2B1E041E-8FA3-4301-A5DB-E6531E9C3CED' then 'DESIGNATION'
else 'OTHER' end),
@DESCRIPTION = [Description]
FROM PDACCOUNTSTRUCTURE
WHERE ID = @ID
return 0;