Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Generate username with a series of zero's prefixed

Abdul_Gaffar
New Contributor II
New Contributor II

Team,

 

We have the requirement to generate username with a specific series ex- 0050000000 and to achieve this we are using register userrule with the data set & OOTB FN_EIC_SEQGEN('abc') function.

 

Saviynt is able to generate username with the spacified series, but unfortunately leading Zeros are getting removed. 

Can you please suggest a fix for this.

Regards,

Abdul Gaffar

1 REPLY 1

armaanzahir
Valued Contributor
Valued Contributor

Hi @Abdul_Gaffar ,

 

Can you try using the Right Function in Mysql to achieve your use case.

SELECT RIGHT("00001", 5) AS ExtractString; -->00001 

SELECT RIGHT("000010", 5) AS ExtractString; -->00010

SELECT RIGHT("0000100", 5) AS ExtractString; -->00100 

In place of the string parameter, enter the expression you're using for generating the username

MySQL RIGHT() Function (w3schools.com)

MySQL Tryit Editor v1.0 (w3schools.com)

 

Regards,
Md Armaan Zahir