?
Solved

duplicate document record numbers

Posted on 2007-10-03
8
Medium Priority
?
328 Views
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...
0
Comment
Question by:kat64
7 Comments
 
LVL 22

Expert Comment

by:Bill-Hanson
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.
0
 
LVL 63

Expert Comment

by:SysExpert
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 !
0
 
LVL 18

Accepted Solution

by:
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.

0
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

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

Author Comment

by:kat64
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");
@Set("DocYear";@DbLookup("":"NoCache";"":"";"(Tracking)";"TrackingNumber";"Year"));

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

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));
      @SetField("Status";"Open");continue);continue);.....

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

Assisted Solution

by:SysExpert
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 !



0
 
LVL 1

Expert Comment

by:Computer101
ID: 20295841
Forced accept.

Computer101
EE Admin
0

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