John Glabb
John Glabb

Reputation: 1621

How to make xPage JavaScript return @Unique() in Lotus Notes format?

Here is the SSJS row:

var tmpID = @Unique();

But it returns unique string in following format:

1sghsekw3hwgh
hswhstky3hts0

And the length is not consistent. It can be 11 or 12 or 13 characters. I'd like it be in Lotus Notes format, like (user initials and some random number):

ATFY-1RE5YU
DGGH-9VE5KX

Or do you know any other way to generate an unique string value with a fixed length?

Upvotes: 1

Views: 351

Answers (1)

Chris Richards
Chris Richards

Reputation: 705

John,

I believe you can achieve that with session.evaluate(“@Unique”)

Upvotes: 8

Related Questions