0

Possible Duplicate:
How to create an auto incrementing field in lotus domino?

We are generating the unique sequence number for each document like an employee ID. But user can enroll the information in different locations. So we replicate the database into many. Problem is, Number is generating. But the sequence number gets duplicated when the user works on different replicas.

Community
  • 1
  • 1
Ramkumar
  • 874
  • 11
  • 27
  • This question appears to be the same. http://stackoverflow.com/questions/8532296/how-to-create-an-auto-incrementing-field-in-lotus-domino – Simon O'Doherty May 25 '12 at 05:24
  • Removed lotusscript and lotus-formula tags because you have not shown any code or told us which one you are attempting to use to create unique numbers. – Richard Schwartz May 25 '12 at 15:31

1 Answers1

4

If you must use sequential numbers, you should have the database assign a temporary number to the document when it is created and then have only one server execute an agent that assigns permanent sequential numbers to the documents on a daily or more frequent basis.

However, most of the time people just need UNIQUE numbers assigned to the documents. Using the @Unique formula generates a unique string to identify a document. Or, you could have it assign sequential numbers that include the server name as a prefix. You could use a combination of date-time and server or user information to create a unique identifier as well.

My experience is that most of the time when people say they have a requirement for sequential numbers, they're wrong, they just need unique numbers and think that sequential is the only way to do it.

David Navarre
  • 1,022
  • 10
  • 27