Solved

Automatic Numbering - HELP!

Posted on 2001-06-18
3
166 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
Comment Utility
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 200 total points
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
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.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

744 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now