Solved

Automatic Numbering - HELP!

Posted on 2001-06-18
3
167 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 200 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Encrypted Mail message in a NSF 10 29
Lotus Notes Database "Invalid NSF Version" 5 1,781
Switching from Lotus Notes to Outlook 4 46
Why the url within notes is no action 6 45
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

910 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

19 Experts available now in Live!

Get 1:1 Help Now