Wonder if anyone could offer some help - I've just designed my first database and now I wish to add autonumber to one of the fields, but I'm unsure of how to do this
I am supposing you wish to implement sequential document numbers.
You need to be very careful on doing this. First thing is : Notes is not capable of doing sequential numbering for multiple authors. It is against the philosphy of a distributed environment. The issue is, since a Notes db can be replicated, there is no guarantee that two users in seperate replicas will avoid creating a doc with the same number.
If you can avoid replicating the db, then you can try a number doc in a special view, with semaphore-type access and hope it will hold out. If it works, it will only work until the day someone replicates the db to another server, or locally.
The best, safest way to do sequential numbering in Notes is per user. Each user can have a profile doc with his number, and that will be incremented normally. Of course, this supposes that only one user is using the ID at the time.
As you can see, putting a sequential number on a document is not an easy task.
Does this answer your question ?
I am an administrator and am not familiar with the coding for all of this in our applications. But it might point you in the right direction.....
In our environment we have several applications on 3 clustered servers, all of which depend on sequential order numbers for all new documents. We have installed MS SQL server on one of the boxes and our applications query that for their numbers.
The SQL server tables are simple as all they do is contain the low and high limits for the numerical range, and the last number assigned to a request. The logic is simple as well, as all it does is increment the number, hand it out, then store it.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.