Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

System Username Generation Use Case and Account Name Check

GoutamAhirwar
New Contributor III
New Contributor III

Dear Saviynt Community,

I am currently working on a use case in which I need to generate a system username based on a comparison with the account name. I have successfully implemented the following condition to generate a username when the first name, middle name, and last name are provided:


IF(
firstname IS NOT NULL AND firstname != '' AND
lastname IS NOT NULL AND lastname != '',
UPPER(
CONCAT(
SUBSTRING(firstname, 1, 1),
IFNULL(NULLIF(SUBSTRING(middlename, 1, 1), ''), 'X'),
SUBSTRING(lastname, 1, 1),
LPAD(FLOOR(RAND() * 1000), 3, '0')
)
),
NULL
)

I am now looking to enhance this logic by adding a condition to also check the account name before generating the username.

Could someone please guide me on how I can incorporate the account name validation into the current logic, or if there’s an alternative approach I should consider?

Thank you in advance for your support and guidance.

Best regards,
Goutam Ahirwar



9 REPLIES 9

Raghu
All-Star
All-Star

@GoutamAhirwar  check below

IF(
firstname IS NOT NULL AND firstname != '' AND
lastname IS NOT NULL AND lastname != '' AND
accountname IS NOT NULL AND accountname != '',
UPPER(
CONCAT(
SUBSTRING(firstname, 1, 1),
IFNULL(NULLIF(SUBSTRING(middlename, 1, 1), ''), 'X'),
SUBSTRING(lastname, 1, 1),
LPAD(FLOOR(RAND() * 1000), 3, '0')
)
),
NULL
)


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

GoutamAhirwar
New Contributor III
New Contributor III

No brother not working not genreating systemusername

Does below solution worked?


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

No

Do systemusername generation logic from global configurations supports account table comparison ?

your query working before adding account condition ?


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

GoutamAhirwar
New Contributor III
New Contributor III

it was working before adding after adding  its not working for account checking 

@GoutamAhirwar  check below column is modified

 

IF(
firstname IS NOT NULL AND firstname != '' AND
lastname IS NOT NULL AND lastname != '' AND
systemusername IS NOT NULL AND systemusername != '',
UPPER(
CONCAT(
SUBSTRING(firstname, 1, 1),
IFNULL(NULLIF(SUBSTRING(middlename, 1, 1), ''), 'X'),
SUBSTRING(lastname, 1, 1),
LPAD(FLOOR(RAND() * 1000), 3, '0')
)
),
NULL
)


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

GoutamAhirwar
New Contributor III
New Contributor III

it didn't  work please let me know .Do systemusername generation logic from global configurations supports account table comparison ?