You are viewing limited content. For full access, please sign in.

Question

Question

Workflow to Add continuous document ID to documents pertaining to a repository.

asked on March 25, 2015

Hi,

I would like to create a field to be used for documents added to a specific repository. The document ID must be continuous and automatically added to documents upon upload/scan.

Any idea of how to create such workflow?

 

0 0

Replies

replied on March 25, 2015

You'll need to trigger a workflow when new documents come in, and get the "next value" from a database.

 

This article is a great one that talks about using this for a new unique invoice number, it works the same!

 

http://www.dfarber.com/computer-consulting-blog/2014/2/16/create-unique-invoice-number-in-sql.aspx

 

 

0 0
replied on March 25, 2015

The identity field is not guaranteed to be continuous in SQL 2012 and higher. See this article for more information and a possible solution involving SQL sequences.

1 0
replied on March 25, 2015

I think I have something similar to what you are asking and we use it to generate sequential application numbers.

Essentially, we have a SQL table that contains the starting value (application number). When I need to assign a new application number to a document, I use Workflow to query the table to retrieve the number and assign it to a field. I then use a Token Calculator activity to increment that number by 1 and write the new number back the SQL table via an Update Data activity. That replaces the old number with the new one that was incremented by 1. The process just repeats every time I need to assign a new number.

Here is a screenshot of how the process looks in Workflow:

 

 

 

replied on March 25, 2015

I'm curious about your requirement for a continuous identifier.  How are you going to use it, and what problems are caused by a gap?

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.