**
I tried using a Push Fields and nearly went bonkers because nothing worked. That's why I eventually resorted to SQL.
 
As for the update, from what I can see that section of the stored procedure is not running at all. The Request Id is being passed - I see it in the first half of the stored procedure.
 
What I am trying to do here is check all the records for a specific CM_Request_Id on the form CM_Approvals to see if all of these have been approved i.e. if Status = 3.
If they have all been approved then I want to push the status of approved to the form CM_Change_Management, where CM_Request_ID = the Request ID on this form.
 
It sounds like a very simple Push fields but as I said I just can't seem to get it to work.
 
P.S. Sorry about the double post - my spam server is to blame!
 
Thanks,
Sharon
 
 
 
 


From: Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED] On Behalf Of Heider, Stephen
Sent: Monday, May 08, 2006 1:12 PM
To: [email protected]
Subject: Re: Running a (MS SQL 2000 SP3) Stored Procedure 0n ARS 5.1.2 patch 1484

**
 
Sharon,
 
I agree with Rick, if you can do it with a Push Fields it would be preferable.  I am not sure of your environment (or version), but if the goal is to only update the CM_Change_Management form AND not fire any filters on that form then you could create a filter that runs at execution level 0 that detects this situation and issues a GOTO 1000 command that skips your workflow.
 
Something else to look at; does the SQL UPDATE command not RUN or runs but not UPDATES?  If it is running then the value of @cmNumber may be blank and therefore would not update any record.  SQL Profiler can be used to verify that it is running and also what the value of your parameter (the command that runs could actually be  update dbo.CM_Change_Management set status = 2 where Request_ID = '').  Note that if your filter [that runs the Direct SQL] fires on Submit then the value of Request ID may be not yet be available at the time your stored procedure is run.
 
Stephen


From: Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED] On Behalf Of Rick Cook
Sent: Monday, May 08, 2006 9:31 AM
To: [email protected]
Subject: Re: Running a (MS SQL 2000 SP3) Stored Procedure 0n ARS 5.1.2 patch 1484

**
Why do you need to do this via a SP?  Wouldn't a Push Fields do the same thing with less overhead?

Rick

From: Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED] On Behalf Of Menachem, Sharon
Sent: Monday, May 08, 2006 5:46 AM
To: [email protected]
Subject: Running a (MS SQL 2000 SP3) Stored Procedure 0n ARS 5.1.2 patch 1484

**
I am trying to run a stored procedure from a filter that will check one form for status <> 3 and if it does not exist, will push a value to another form. 
 
After testing the stored procedure in the query analyzer I am now trying to run it through a filter with directsql. I see that the stored procedure runs and checks for the presence of status <> 3 but it does not continue and run the update to the second table. Any idea why not?
 
Here is the stored procedure:
ALTER   procedure RMD_usp_Check_CM_Approvals
(
 @cmNumber varchar(15)
)
 
as
 
--begin transaction
--commit
--rollback
 
if not exists
(select status from dbo.CM_Approvals
 where CM_Request_ID = @cmNumber
 and
 status <> 3)
 
update dbo.CM_Change_Management
set status = 2
where Request_ID = @cmNumber
 
Thanks very much,
Sharon
 
 
 
 
***********************************************************************************
This email message and any attachments thereto are intended only for use by the addressee(s) named above, and may contain legally privileged and/or confidential information. If the reader of this message is not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the [EMAIL PROTECTED] and destroy the original message.
*********************************************************************************** __20060125_______________________This posting was submitted with HTML in it___ __20060125_______________________This posting was submitted with HTML in it___ __20060125_______________________This posting was submitted with HTML in it___***********************************************************************************
This email message and any attachments thereto are intended only for use by the addressee(s) named above, and may contain legally privileged and/or confidential information. If the reader of this message is not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the [EMAIL PROTECTED] and destroy the original message.
*********************************************************************************** __20060125_______________________This posting was submitted with HTML in it___

Reply via email to