Auto numbering with Stored Procedure

A forum for Custom Reporting & SQL Queries in Deltek Vision.

Auto numbering with Stored Procedure

Postby Don » Thu Jun 17, 2010 3:04 pm

Does anyone have any experience with setting up Auto Numbering with a Stored Procedure. The link looks the same as the one in workflows. If anyone has any information on it I would appreciate it. I cannot find anything on it. Thanks.
Don
 
Posts: 7
Joined: Tue May 19, 2009 11:13 am

Re: Auto numbering with Stored Procedure

Postby BBlum » Thu Jul 29, 2010 10:50 am

There is very little information on how to construct and install a stored procedure to use with AutoNumbering.

I recently designed code for a client where the Stored Procedure looked something like this:

USE [Vision]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[AMRProjectID]
( /*N*/@OfficeToConvert varchar(1)
,/*N*/@ChargeTypeToConvert varchar(1)
,/*N*/@WBS1 varchar(12) OUTPUT)
AS
BEGIN
set @WBS1 = ?????
RETURN 0
END


The "set @WBS1" code can use Select SQL statements to gather the information you need. In this case, we passed the Org code and Charge Type from the Project Info Center for the new project into the stored procedure. We manipulated the data and passed the new project ID back as WBS1.

When you let Vision know you are using a stored procedure for the AutoNumber, it will allow you to enter the Stored Procedure ID and will show you the two passed field names that you will map to Vision fields.

Good luck,
Bill Blum
BBlum
 
Posts: 1
Joined: Thu Jul 29, 2010 10:23 am


Return to Custom Reporting & SQL Queries

Who is online

Users browsing this forum: No registered users and 1 guest

cron