Reputation: 525
what are the different parameters based on which @unique in Lotus Notes returns a unique value.
Upvotes: 1
Views: 1582
Reputation: 2812
In addition to other answers:
Multiple calls to @unique on the same machine will always return a unique answer, even if called repeatedly quicker than the time resolution would otherwise allow for. The counter will always be moved on.
Upvotes: 1
Reputation: 14628
The documentation is incorrect when it says that @Unique() returns a "random, unique text value". It is not random, and in fact there is no random component of the value. It is not guaranteed to be unique.
The return value of @Unique is based on the username and the date/time. The first four characters are: First letter of first name + First letter of last name + Second letter of last name + Last letter of last name. The final six characters are a date/time stamp with a resolution of 1 second. I do not know how the encoding for that works. This value will always increase with time.
Upvotes: 4
Reputation: 22264
Just use @Unique
with no parameters and it will construct a unique value.
There is a slight chance that a duplicate value can be returned, if different users with similar names call this formula during the same second. This site discusses workarounds for that issue if that's important to you.
Upvotes: 4