We're looking into other ways to generate unique keys, and we'd like to know if there's a way via LotusScript to generate a Windows Globally Unique Identifier (GUID). I've done some searching and people only talk about them, not how to generate them on the fly. Can you help?
So, IF I created a document, @Unique would generate a key like BMAY-66RH28, where the first segment was generated from my userID and the last part is related to date and time. IF the keys are all generated by an agent and signed by the same ID, the first part is not really relative. Start with a database, or a state identifier, PA, add the timestamp part of @Unique, 66RH28 and an initial differentiator -- 0 to get a possible key of PA-66RH28-0. Check if a document exists with that key, if it does increment the differentiator by one and check again.
In some applications, we change the position of the differentiator and database identifier so that the 0 doesn't always appear at the end of the key. So possible variations of the same unique identifier, PA-66RH28-0, in different formats could be PA66RH280, PA-066RH28, 66RH280PA and 0PA66RH280.
Do you have comments on this Ask the Expert question and response? Let us know.
Dig Deeper on Lotus Notes Domino Application Development
Related Q&A from Brian Mahoney
Find out what types of calculations can be computed for a column in a Lotus Notes view and the best way to go about it with this expert response. Continue Reading
Find out why you can't use Formula language to include a doclink to a specific Lotus Notes view or database and need to use LotusScript instead. Continue Reading
SearchDomino.com's expert Brian Mahoney explains how to work around the default replication and form parameters of profile documents, so that the ... Continue Reading