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

RAND() - Username Generation Advanced Query

sfinney
New Contributor II
New Contributor II

Hello,

I am trying to create a rule for username generation that give first initial, last initial, 4 random numbers. I have tried the following:

 
concat(substring(users.firstname,1,1),substring(users.lastname,1,1),FLOOR(RAND()*10000))
this generates the name: <first initial><last initial>FLOORRAND*10000
 
concat(substring(users.firstname,1,1),substring(users.lastname,1,1),substring(RAND(),3,6))
this generates the name: <first initial><last initial>RAND

I tested other math functions like, PI(), POWER(), AVG(), in the Advanced Query, and I had the same issue.

Thanks in advance,

sfinney

7 REPLIES 7

mbinsale
Saviynt Employee
Saviynt Employee

Tried this and this works as expected. Please create a support ticket with the relevant logs attached from the "Admin"-> "Application Log" section for the team to troubleshoot this in detail.

rushikeshvartak
All-Star
All-Star

what is error in logs ?

Please share full query


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

concat(substring(users.firstname,1,1),substring(users.lastname,1,1),FLOOR(RAND()*10000))

 

I tried multiple variations to get a random number 4 digit number. I also included screenshots of the username it generates.

sfinney
New Contributor II
New Contributor II

Here is a screenshot of the query.

Advance Query option does not working in Add Register User Rule 

https://ideas.saviynt.com/ideas/EIC-I-2900

rushikeshvartak_0-1675107602174.png

 

 


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

mbinsale
Saviynt Employee
Saviynt Employee

This is supported already and hence please create a support ticket so advance troubleshooting can happen for resolution. It could be a bug in that specific version that you are running.Actual User Attributes after User CreationActual User Attributes after User CreationCreate User ResultCreate User ResultCreate User FormCreate User FormGeneration RuleGeneration Rule

Here requirement is of username field not system username.

Its working fine for systemusername


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