Generate @unique key for a different user

Hello,

I am trying to create a unique ID for an app for which the @unique formula almost fits.

When @unique generates a key (RMEA-xxxxxx) its based on the current user’s name, I need to generate a key based on a different user name (available in a field).

I tried to recreate the first 4 chars RMEA, but the logic seems complex as it takes chars from different positions for each user.

Can anybod advice on how to generate the unique ID for a different user?

Thanks in advance

Rakesh

Subject: Generate @unique key for a different user

The rules for the first part of @Unique are quite simple. It’s the first letter of the first name, the first 2 letters of the last name, and the last letter of the last name.

So for me, it’s Graham RIchardS = GRIS-xxxxx

With that, you should be able to simulate an @Unique for a given name.

Subject: RE: Generate @unique key for a different user

Assigning Unique/Sequential Document Identifiers

Subject: Generate @unique key for a different user

Hi Rakesh,

As u mentioned you want to generate @unique based on different user name(available ina field). take the four chars from the field available and replace with @unique value.

Ex: lake 4 chars from the field

tmp:=@left(field;4)

tmp1:=@word(uniquevalue;"-"2) then

replace tmp1 with tmp.

its not complex just change ur approach then see its very easy:)

I hope this helps…

Regards

SUMAN