Lotus Notes auto referencing

Hi,

Based on the following post, i can see no exact solution is provided.

http://www.experts-exchange.com/Software/Server_Software/Email_Servers/Lotus_Domino/Q_24387773.html

My question is whether any script available for auto referencing in help desk. If any user would like to raise the case, an auto number is generated in the required field, although the number shall be as follow.

ITHELP-01

whereas auto number of lotus does not meet our requirement using the unique string and then lotus generate such numbers 8XQ98J.

Regards
LVL 5
Omid OmarkhailSenior Technical ConsultantAsked:
Who is Participating?
 
Steve KnightIT ConsultancyCommented:
Sequential numbering is not necessarily easy on Notes, and sometimes you have to ask WHY does it have to be sequential - as long as the user has a reasonable looking number to quote back to you.  Imagine these scenarios, and perhaps suggest what applies in your case:

Database is on ten servers in different offices, or countries that don't replicate immediately Some users have (or could have) local replicas and work offline
The same app works from web browser
How often are new entries in, every minute, hour, etc?
etc.

Some ways to do this:

Store a document / profile document with the last number in.  Look for this doc on specific server / replica, lock it, grab the number, save it, carry on...

Pick the latest entry out of a view, add one to it on document save.

Use add-in task (couple of sites use one that has been around since R4 days there and still works, but don't think is available to buy any more).

Have a server agent allocate number periodically

etc.

Using a view might mean someone else's number has not made it to the view yet for whatever reason, maybe from another replica so you get a duplicate.  You can do something like this in formula of field or in QuerySave:

lastnum:=@Subset(@DbLookup("":"NoCache";"":"";"(RequestsByID)";UserID;2);1);
lastnum2:=@If(lastnum="" | @IsError(lastnum);1;@TextToNumber(lastnum)+1);
"LOG-" +UserID + @Right("0000" + @Text(lastnum2);4)

In that case the "userID" was a field having their windows logon so they got a sequential number of LOG-userid-0001

You can do something similar just picking the first entry from the view (or more efficiently from LotusScript) though much more likely to get duplicates.

Having server agent allocate it would mean your calls get allocated numbers but not until after they are saved which doesn't help with popping up to tell someone their call number.

So a lot depends on how you want this to work with your application if you could fill us in a little.

Steve
0
 
ThomasMcA2Commented:
I created a scheduled agent to assign the ticket # that only ran on one server. That avoided the duplicated ticket numbers.

For those times when the support technician needed a ticket number right away, I created a "Get Ticket Number" button on the form that used the LotusScript function NotesAgent.RunOnServer to run the agent directly on the server.

The downside to the above is that your ticket assignment process depends on a specific server always being available.
0
 
Steve KnightIT ConsultancyCommented:
Why a B grade without feedback?  Was that not enough information?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.