USP_DATAFORMTEMPLATE_VIEW_RESPONSEPAGEDATA
The load procedure used by the view dataform template "Response Page 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. |
@CATEGORYNAME | nvarchar(400) | INOUT | CATEGORYNAME |
@NUMRESPONSES | int | INOUT | NUMRESPONSES |
@SORTMETHODCODE | tinyint | INOUT | SORTMETHODCODE |
Definition
Copy
create procedure dbo.USP_DATAFORMTEMPLATE_VIEW_RESPONSEPAGEDATA
(
@ID uniqueidentifier,
@DATALOADED bit = 0 output,
@CATEGORYNAME nvarchar(400) = null output,
@NUMRESPONSES int = null output,
@SORTMETHODCODE tinyint = null output
)
as
set nocount on;
set @DATALOADED = 0;
select
@DATALOADED = 1,
@CATEGORYNAME = RC.NAME,
@NUMRESPONSES = (select count(ID) from dbo.RESPONSE where RESPONSECATEGORYID = @ID),
@SORTMETHODCODE = SORTMETHODCODE
from
dbo.RESPONSECATEGORY AS RC
where
RC.ID = @ID;
return 0;