John,
Below is how I called the stored procedure and also a snap shot of the actual stored procedure.
Thanks for all your help .
--Trina
Trina Roberson
Office Automation Analyst
Chatham County ICS
133 Montgomery Street Room 507
Savannah, Georgia 31401
912-652-7343
>>> J.J. Kane 3/18/2009 9:20 AM >>>
The Form Template [FORM:ID] is showing blank when sending
to the sql server.
The profiler trace on the sql server running the database.
shows the following.
"exec ICSLeaveprogrammers ''
This shows that the conditional work flow step is executing and sending the stored procedure
but for some reason the [FORM:ID] is blank. Is the form out of scope when the procedure is sent.
If so what template item can I use to fill in the entry box.
Below is a copy of the conditional area of the work flow and below that is the Stored procedure
(Just in case you would like to see it). Any help will be appreiated.
============================================== Entry into
Database Connection | |
The Type of SQL to Execute | Required |
SQL Text to Execute (Form Tokens supported) | |
======================= Stored Procedure
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER PROC [dbo].[ICSLeaveProgrammers]
@record_id INT
AS
DECLARE @RC int
DECLARE @EventDateBegin datetime
DECLARE @EventDateEnd datetime
DECLARE @EventTimeBegin datetime
DECLARE @Duration int
DECLARE @EventName nvarchar(100)
DECLARE @EventDesc nvarchar(1000)
IF EXISTS (SELECT 1 FROM EFView_6 WHERE Dt1 IS NOT NULL AND record_id = @record_id)
BEGIN
--Do the event add for Dt1
SELECT @EventDateBegin = Dt1, @EventDateEnd = Dt1, @EventTimeBegin = DATEADD(hh, 8, Dt1), @Duration = Time1 * 60, @EventName = UserName, @EventDesc = LeaveType + ': ' + CAST(Reason AS NVARCHAR)
FROM EFView_6
WHERE Dt1 IS NOT NULL
AND record_id = @record_id
--SELECT @EventDateBegin ,@EventDateEnd ,@EventTimeBegin ,@Duration ,@EventName ,@EventDesc
EXECUTE @RC = [Intranet].[dbo].[EventsSave]
2 --portalID
,NULL
--@EventID
,528 --ModuleID
,@EventDateBegin ,@EventDateEnd ,@EventTimeBegin ,@Duration ,@EventName ,@EventDesc
,2 ,1 ,1 ,0 ,NULL ,N ,NULL ,True ,NULL ,NULL ,NULL ,NULL ,NULL ,NULL ,NULL ,False ,NULL ,NULL ,NULL ,NULL ,NULL ,0 ,NULL ,NULL ,0 ,NULL ,NULL ,NULL ,-300 ,NULL ,NULL ,NULL ,NULL ,NULL ,NULL ,NULL
END
IF EXISTS (SELECT 1 FROM EFView_6 WHERE Dt2 IS NOT NULL AND record_id = @record_id)
BEGIN
--Do the event add for Dt2
SELECT @EventDateBegin = Dt2, @EventDateEnd = Dt2, @EventTimeBegin = DATEADD(hh, 8, Dt2), @Duration = Time2 * 60, @EventName = UserName, @EventDesc = LeaveType + ': ' + CAST(Reason AS NVARCHAR)
FROM EFView_6
WHERE Dt2 IS NOT NULL
AND record_id = @record_id
--SELECT @EventDateBegin ,@EventDateEnd ,@EventTimeBegin ,@Duration ,@EventName ,@EventDesc
EXECUTE @RC = [Intranet].[dbo].[EventsSave]
2 --portalID
,NULL
--@EventID
,528 --ModuleID
,@EventDateBegin ,@EventDateEnd ,@EventTimeBegin ,@Duration ,@EventName ,@EventDesc
,2 ,1 ,1 ,0 ,NULL ,N ,NULL ,True ,NULL ,NULL ,NULL ,NULL ,NULL ,NULL ,NULL ,False ,NULL ,NULL ,NULL ,NULL ,NULL ,0 ,NULL ,NULL ,0 ,NULL ,NULL ,NULL ,-300 ,NULL ,NULL ,NULL ,NULL ,NULL ,NULL ,NULL
END
IF EXISTS (SELECT 1 FROM EFView_6 WHERE Dt211 IS NOT NULL AND record_id = @record_id)
BEGIN
--Do the event add for Dt211
SELECT @EventDateBegin = Dt211, @EventDateEnd = Dt211, @EventTimeBegin = DATEADD(hh, 8, Dt211), @Duration = Time212 * 60, @EventName = UserName, @EventDesc = LeaveType + ': ' + CAST(Reason AS NVARCHAR)
FROM EFView_6
WHERE Dt211 IS NOT NULL
AND record_id = @record_id
--SELECT @EventDateBegin ,@EventDateEnd ,@EventTimeBegin ,@Duration ,@EventName ,@EventDesc
EXECUTE @RC = [Intranet].[dbo].[EventsSave]
2 --portalID
,NULL
--@EventID
,528 --ModuleID
,@EventDateBegin ,@EventDateEnd ,@EventTimeBegin ,@Duration ,@EventName ,@EventDesc
,2 ,1 ,1 ,0 ,NULL ,N ,NULL ,True ,NULL ,NULL ,NULL ,NULL ,NULL ,NULL ,NULL ,False ,NULL ,NULL ,NULL ,NULL ,NULL ,0 ,NULL ,NULL ,0 ,NULL ,NULL ,NULL ,-300 ,NULL ,NULL ,NULL ,NULL ,NULL ,NULL ,NULL
END
IF EXISTS (SELECT 1 FROM EFView_6 WHERE Dt213 IS NOT NULL AND record_id = @record_id)
BEGIN
--Do the event add for Dt213
SELECT @EventDateBegin = Dt213, @EventDateEnd = Dt213, @EventTimeBegin = DATEADD(hh, 8, Dt213), @Duration = Time214 * 60, @EventName = UserName, @EventDesc = LeaveType + ': ' + CAST(Reason AS NVARCHAR)
FROM EFView_6
WHERE Dt213 IS NOT NULL
AND record_id = @record_id
--SELECT @EventDateBegin ,@EventDateEnd ,@EventTimeBegin ,@Duration ,@EventName ,@EventDesc
EXECUTE @RC = [Intranet].[dbo].[EventsSave]
2 --portalID
,NULL
--@EventID
,528 --ModuleID
,@EventDateBegin ,@EventDateEnd ,@EventTimeBegin ,@Duration ,@EventName ,@EventDesc
,2 ,1 ,1 ,0 ,NULL ,N ,NULL ,True ,NULL ,NULL ,NULL ,NULL ,NULL ,NULL ,NULL ,False ,NULL ,NULL ,NULL ,NULL ,NULL ,0 ,NULL ,NULL ,0 ,NULL ,NULL ,NULL ,-300 ,NULL ,NULL ,NULL ,NULL ,NULL ,NULL ,NULL
END
>>> Ethuongmai Support <support@ethuongmai.com> 3/18/2009 5:45 AM >>>
Trina,
The stored procedure you created, what are the required parameters and how are you calling the stored procedure in the advanced workflow processing task?
Thanks
John M
PS: If possible please use our forums for faster support response.
tyrobers@chathamcounty.org wrote:
| From: | Trina Roberson |
| When: | 3/17/2009 11:32:26 AM |
| "I created a stored procedure called "ICSLEAVEPROGRAMMERS" This store procedure creates a event to our calendar called ICS Calendar" I called the stored procedure under the workflow for the manager under "Advanced workflow options" This is the text I am using " ICSLEAVE PROGRAMMERS . When I run a trace in SQL server to see what is happening it show the stored procedure being called but nothing is passed through it . This is what it look like " ICSLEAVE PROGRAMMERS ' ' " The form information is not being passed through . I am doing this correctly . Should I be sending in the FORM ID. Please any help would be greatly appreciated. " |
__________ Information from ESET Smart Security, version of virus signature database 3944 (20090317) __________
The message was checked by ESET Smart Security.
http://www.eset.com