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
Discover the reasons behind a Notes/Domino admistrator having trouble with disabled options in the "customize this view" section of his Lotus Notes ...continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.