In Notes formulas the @Unique function return a unique string based on the Notes user's ID name and time. So when I create several documents in Notes the first part of the unique string is always derived from my name, Paul Della-NebbiA, like this: PDNA-AJBQYD PDNA-AJBQYL PDNA-AJBQYN
If I login to Notes with a different ID, App DEV2, the first part of the @Unique string is then as follows: ADEV-AJBQZG ADEV-AJBQZQ ADEV-AJBQZS
I want to produce a similar result in SSJS to generate a unique identifier for new documents when they are created. However, it appears that the first part of the @Unique() string is always derived from the server and domain name.
Here is the SSJS code I am using to generate the unique id:
newdoc.replaceItemValue("AssignmentId",session.evaluate("@Unique").elementAt(0) );
So is there a way in SSJS to get @Unique() to work like it does in Notes, and generate the first four characters based on the authenticated user name?