We are delighted to share our new EIC Delivery Methodology for efficiently managing Saviynt Implementations and delivering quick time to value. CLICK HERE.

Facing issue when we are trying to generate System Username using Advance Config

SIRAJMOLLA
New Contributor III
New Contributor III
Hi All,
We are using Global Config system username generation for creating the Samaccount and there we are facing issue.Below is the usecase that we are trying to achieve using saviynt sequence generation function in the logic we see that it's generating the sequence but in usecase - If suppose firstname=Mike and Lastname=Lee then format needs to be create like MLEE00001 when next user system username will generate as an example firstname=Kim lastname=Lee then format should be KLEE00002 when increment cross 9 then the next will be generate like KLEE00010 instead of showing KLEE10.Is there any way using Saviynt Sequence generation number we can generate sequence number from 00001 then when it cross to 10 then 00010 again when it cross to 100 then 00100 like that.
 
With Regards,
Siraj Molla
3 REPLIES 3

armaanzahir
Valued Contributor
Valued Contributor

Hi @SIRAJMOLLA ,

 

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

MySQL RIGHT() Function (w3schools.com)

MySQL Tryit Editor v1.0 (w3schools.com)

Thanks,

Armaan

 

Regards,
Md Armaan Zahir

rushikeshvartak
All-Star
All-Star

Share current rule.


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Hi Rushikesh,

Below is the logic -

IF((LENGTH(replace(users.lastname,"'","")) >= 4), UPPER(CONCAT(SUBSTRING(replace(users.firstname,"'",""), 1, 1),SUBSTRING(replace(users.lastname,"'",""), 1, 4),FN_EIC_SEQGEN('sam'))), UPPER(CONCAT(SUBSTRING(replace(users.firstname,"'",""), 1, 1),SUBSTRING(replace(users.lastname,"'",""), 1, 3), 0,FN_EIC_SEQGEN('sam'))))

With Regards,

Siraj Molla