USP_DATAFORMTEMPLATE_VIEW_JOBPAGEDATA
The load procedure used by the view dataform template "Job 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. |
@NAME | nvarchar(100) | INOUT | Name |
@ISACTIVE | bit | INOUT | Active |
@BASECURRENCYCANBECHANGED | bit | INOUT | Base currency can be changed |
Definition
Copy
CREATE procedure dbo.[USP_DATAFORMTEMPLATE_VIEW_JOBPAGEDATA]
(
@ID uniqueidentifier,
@DATALOADED bit = 0 output,
@NAME nvarchar(100) = null output,
@ISACTIVE bit = null output,
@BASECURRENCYCANBECHANGED bit = null output
)
as
set nocount on;
set @DATALOADED = 0;
select
@DATALOADED = 1,
@NAME = [NAME],
@ISACTIVE = [ISACTIVE]
from dbo.[JOB]
where [ID] = @ID;
set @BASECURRENCYCANBECHANGED = case when exists (select top 1 1 from dbo.[JOBOCCURRENCE] where [JOBID] = @ID and [EVENTID] is not null) then 0 else 1 end;
return 0;