Lotus Notes auto referencing

Posted on 2012-08-31
Last Modified: 2013-12-18

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

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.


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

Question by:Omid Omarkhail
    LVL 43

    Accepted Solution

    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?

    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


    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:

    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.

    LVL 43

    Expert Comment

    by:Steve Knight
    LVL 14

    Expert Comment

    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.
    LVL 43

    Expert Comment

    by:Steve Knight
    Why a B grade without feedback?  Was that not enough information?

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

      In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
    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.
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!

    745 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

    14 Experts available now in Live!

    Get 1:1 Help Now