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

Username getting created with a space

sundas7
Regular Contributor II
Regular Contributor II

Hi Experts,

We are seeing username is getting created with spaces, Although the last name have space or any special character it should consider it and eliminate the same and create it. but that is not happing especially with space.( something if last name is like St. Andrews).

Username Generation rules

Rule1

Users

FirstName Initial character: 1

Last Name :Initial character: 7

We were asked to use the advance config in register user rule to get the space removed.

We are trying with multiple combinations as below,but still we have not got to resolving it yet

CASE WHEN (users.username is NOT NULL) then CONCAT(substring(users.firstname,1,1), substring(REPLACE(users.lastname,' ',''),1,7)) ELSE CONCAT(substring(users.firstname,1,1), substring(REPLACE(users.lastname,' ',''),1,5),FLOOR(RAND()*100)) END ### CASE WHEN (users.username is NULL) then CONCAT(substring(users.firstname,1,1), substring(REPLACE(users.lastname,' ',''),1,5),FLOOR(RAND()*100)) ELSE CONCAT(substring(users.firstname,1,1), substring(REPLACE(users.lastname,' ',''),1,5),FLOOR(RAND()*100)) END

Thanks

Shyam

6 REPLIES 6

Srinivas
Saviynt Employee
Saviynt Employee

Hello @sundas7

I see you are on v5.5sp3.x. As per the FD article the advance config is available from v2020.1.x as shown below snip.

Srinivas_3-1669911255489.png

Could you please refer below documentation.

https://saviynt.freshdesk.com/support/solutions/articles/43000619084-identity-lifecycle-configuratio...

Thanks & Regards

Srinivas

rushikeshvartak
All-Star
All-Star

Does query running properly in data analyzer?


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

Hi @rushikeshvartak ,

We could not be able to run on data analyzer.

currently as mentioned the above query's first condition working as expected but when the user having same firstname and lastname(if the username already exist in DB) it should print the else one, it is not happening here.

Regards,

Chandan Gowda

What’s issue in data analyzer ?

try using regex or substring


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

Whenever i was tried to run the above query on data analyzer, showing an error. unable to fetch data from users table.

cgowda_0-1671012343761.png

Thanks,

Chandan Gowda

Use analytics 


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