USP_RECORDOPERATION_GETMETADATA_FORPROMPT

Parameters

Parameter Parameter Type Mode Description
@ID uniqueidentifier IN

Definition

Copy


            create procedure [dbo].[USP_RECORDOPERATION_GETMETADATA_FORPROMPT](@ID uniqueidentifier)
            as begin

                declare @spec XML
                declare @timeout int
                declare @prompt nvarchar(50)
                declare @hasPrompt bit

                set @hasPrompt = 0;

                select 
                    @prompt = RECORDOPERATIONSPECXML.value(
                        'declare namespace bbrecordoperation="bb_appfx_recordoperation";
                        (//bbrecordoperation:Prompt)[1] ', 'nvarchar(500)'),                    
                    @spec = RECORDOPERATIONSPECXML,                     
                    @timeout = TIMEOUTSECONDS

                from
                    dbo.RECORDOPERATIONCATALOG        
                where
                    RECORDOPERATIONCATALOG.ID = @ID;

                -- don't return the spec if the prompt element doesn't exist 
                if @prompt is null
                    set @spec = null
                else
                    set @hasPrompt = 1

                select @spec as SPECXML, @timeout as TIMEOUTSECONDS, @hasPrompt as HASPROMPT

                return 0
            end