Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Automatic Numbering - HELP!

Posted on 2001-06-18
3
Medium Priority
?
178 Views
Last Modified: 2013-12-18
I have inherited a database created by someone else.  It has a reference number comprising of letters and sequential numbers.

When the user creates a new document, they are prompted on queryopen to select the document type (and therefore the letters to be used to prefix the number), this is then used to look up the next available number for that prefix (on a separate document), which is used for the reference number.  The number returned is then incremented by one and written back to the number document.

Obviously there are problems applying the number at queryopen (ie even if the document is not saved, the number still increments), however the user is experiencing erratic numbering far beyond the extent you would expect with creating and not saving documents.  Numbers are working sequentially, then suddenly jumping anything from 2 up to 60!  Does anyone have any ideas, because I've tried everything I can think of.

Deb
0
Comment
Question by:gingerdeb
3 Comments
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 6204749
You have to take a close look at the database.

Check for any hidden views or profile documents where the counter might be increased irrespective of the doc save.

As you said that the counter is generated in the queryopen, it would be appropriate if the counter is increased before save i.e in QuerySave.


If you want me to take a look at the database, you are most welcome.

Here is my Email hemanthakumark@bigfoot.com

PS: Compress the database and send it to me.

~Hemanth
0
 
LVL 6

Accepted Solution

by:
ghassan99 earned 600 total points
ID: 6205872
I had this problem before, here is how I tackled it:
I check for the last number in the view of numbers (in queryopen), retrieve it, add one to it, then show it to the user.  NOTE: I'm not adding this number to the view of numbers, or creating a doc for the new number.  When the user is ready to the save, I check this number in the querysave event to see if its still the next number in the number's view.  If it is, then I create a document and add it to the number's view.  If not, I will check what the next number is, then alert the user to the number change, and create a new document in the numbers view.  This way is 98% bullet proof (according to my OWN benchmark:).  There is no way that u will achieve 100% accuracy.
You can also check this Faq for extra info:
http://www.keysolutions.com/NotesFAQ/howdo.html

-Gus
0
 
LVL 2

Author Comment

by:gingerdeb
ID: 6240397
I'm accepting Gus' answer because it had some useful tips in it for future reference, although it didn't actually solve this particular problem.  Personally, I'm thinking user-error/ignorance is the cause of the large gaps in numbering.  The user is claiming numbers are missing, but I've been able to show her the documents with the missing numbers in another view - for some reason, she's still not convinced!  As for some of the minor gaps - I'm still not sure as the numbering was initially done via a script when old documents were imported into the database!  Anyway, there doesn't seem to be a problem any longer.

Thanks,

Deb
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
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.
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

877 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