Announcing the SAVIYNT KNOWLEDGE EXCHANGE unifying the Saviynt forums, documentation, training, and more in a single search tool across platforms. Click HERE to read the Announcement.

Systemusername rule

Vinit556
New Contributor III
New Contributor III

Hello,

I have a use case where systemusername should be generated based on some conditions:

Conditions # 1 If country is "Singapore" and employee type is "Employee"....Systemusername should be 

<Emp><firstname intital><sing><1>

here <1> should be incremented if first name initial is repeated.

like :

<Emp><firstname intital><sing><1>

<Emp><firstname intital><sing><2>.....and so on

 

Conditions #2 If country is "Singapore" and employee type is "Contract"....Systemusername should be

<Cont><firstname intital><sing><1>

here <1> should be incremented if first name initial is repeated.

like :

<Cont><firstname intital><sing><1>

<Cont><firstname intital><sing><2>.....and so on

I have tried following but doesn't work:

CASE WHEN ((users.country like '%Singapore%') and (users.employeetype like '%Employee%' )) then concat('Emp',LEFT(users.firstname,1),'sing','1') END ###

CASE WHEN ((users.country like '%Singapore%') and (users.employeetype like '%Employee%' )) then concat('Emp',LEFT(users.firstname,1),'sing','2') END### .......and so on

CASE WHEN ((users.country like '%Singapore%') and (users.employeetype like '%Contract%' )) then concat('Cont',LEFT(users.firstname,1),'sing','1') END ###

CASE WHEN ((users.country like '%Singapore%') and (users.employeetype like '%Contract%' )) then concat('Emp',LEFT(users.firstname,1),'sing','2') END ###......and so o

 

3 REPLIES 3

rushikeshvartak
All-Star
All-Star

Please try # as a separator 


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

Hello Rushikesh, 

I have tried # as well but it is still not going through. 

concat(users.firstname , substring('.',1,1) , users.lastname) ### CASE WHEN (users.middlename is NOT NULL) THEN concat(users.firstname , substring('.',1,1) , substring(users.middlename,1,1) , substring('.',1,1) , users.lastname) END ### concat(users.firstname , substring('.',1,1) , users.lastname , substring('1',1,1))### concat(users.firstname , substring('.',1,1) , users.lastname , substring('2',1,1))### concat(users.firstname , substring('.',1,1) , users.lastname , substring('3',1,1)

https://docs.saviyntcloud.com/bundle/SSM-Admin-v55x/page/Content/Chapter06-Configuring-SSM/Configure... 

CASE WHEN((users.country like '%Singapore%') and (users.employeetype like '%Employee%' )) then concat('Emp',substring(users.firstname,1,1),'sing','1') END ###
CASE WHEN((users.country like '%Singapore%') and (users.employeetype like '%Employee%' )) then concat('Emp',substring(users.firstname,1,1),'sing','2') END ###
CASE WHEN((users.country like '%Singapore%') and (users.employeetype like '%Contract%' )) then concat('Con',substring(users.firstname,1,1),'sing','1') END ###
CASE WHEN((users.country like '%Singapore%') and (users.employeetype like '%Contract%' )) then concat('Con',substring(users.firstname,1,1),'sing','2') END

 


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