duplicate document record numbers

Posted on 2007-10-03
Medium Priority
Last Modified: 2013-12-18
Whenever there are alot of users in this document management database, the document record ids duplicate.  The database isn't replicating to any other database.  I do see an agent resets the annual id counter.  Other than that...I don't know why this is happening.  Please help!!  Thanks...
Question by:kat64
LVL 22

Expert Comment

ID: 20009587
Notes is not a relational database system, so it does not maintain sequential numbering systems well.  It sounds like your database has a custom numbering engine built into it.  You will need to explain the system in detail or post the source code for us to have a chance of helping you.
LVL 63

Expert Comment

ID: 20010145
I agree. It depends on how how the ID numbering was implemented.

If the Docs themselves are not duplicates, you may simply need a agent to renumber them.

I hope this helps !
LVL 18

Accepted Solution

marilyng earned 1000 total points
ID: 20011353
Probably what is happening is one of two things:  the document counter is being set in a profile document, which doesn't refresh - since profile documents are really meant for somewhat static information, or the counter is collecting the next sequence number from a view when the document opens (post open event on the form), which means a bunch of people can open a document and get the same number - this approach is usually tied to a view of saved documents.  The view of saved documents doesn't refresh until someone saves the document, so again, a bunch of people can open a document and get the same number.

Probably this is because someone wanted to see the next sequence number while they're working on the form.  In reality, the only way this type of sequential numbering works is when the document is being saved and is closing.  This is probably the only way to insure that you're not going to get a duplicate number - and even that isn't foolproof if you have two people saving a document at the same time.

But as Bill-Hanson properly comments, Notes is not a relational database system with record locking.

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.


Author Comment

ID: 20042348
...I am sunsetting this question for now...Thanks for your help!!!

Author Comment

ID: 20082015
Hi guys...back to the duplicate tracking numbers...Investigating the problem resulted in seeing that the duplication is coming from a tracking number...not the document id.  The document id is unique each time.  Here's the code behind the tracking number assignment...

Rem {need to assign a number?};
AssignNumber := @If (TaskNumber = ""; "Yes"; "No");
DocYear := DocYear;
ControlNum := ControlNum;
Rem {Get docID of control form};
ControlID := @DbLookup("":"NoCache";"":"";"(Tracking)";"TrackingNumber";"DocumentID");

Rem {Get control number};
@If( @Text( @Year( @Today)) != DocYear;
      @Do (  @Set("ControlNum"; 1);
             @SetDocField(ControlID; "Year"; @Text( @Year( @Today))));
            @Set("ControlNum";@TextToNumber( @DbLookup

NewNum := "ES-" + @Text(@Year(@Today)) + "-" + @Right("0000" + @Text(ControlNum);5);
NewControl := ControlNum + 1;

@If(AssignNumber = "Yes";
      @Do( @Setfield ("TaskNumber"; NewNum);
      @SetDocField(ControlID; "TrackNum"; @Text(NewControl));

Ex of assigned number: ES-2007-01158. There is also a trackingNumber profile document.
LVL 63

Assisted Solution

SysExpert earned 1000 total points
ID: 20082630
Don't use a control number, put in a date in the format of  yyyymmdd, and then use unique to create an additional ID to be added.

Tracking numbers should not need to be sequential.
I hope this helps !


Expert Comment

ID: 20295841
Forced accept.

EE Admin

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
SQL Database Recovery Software repairs the MDF & NDF Files, corrupted due to hardware related issues or software related errors. Provides preview of recovered database objects and allows saving in either MSSQL, CSV, HTML or XLS format. Ensures recov…
Suggested Courses

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question