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

System Username Generation Rule using 'If else'

JPMac
Regular Contributor
Regular Contributor

Hi team,

I want to create a system user name according to the following conditions.

====
1. If the user's companyname is' A', make it' ABCD '+users.username.
2. If the user's companyname is other than 'A', do nothing to create a system user name.

====

I tried the following query, but it doesn't work.

===

if ((users.companyname)='A', (concat('ABCD',users.username)))
===

Can you give me some advice on how to make it work properly?

Regards,

1 REPLY 1

pruthvi_t
Saviynt Employee
Saviynt Employee

Hi @JPMac ,

Greetings.

Kindly try to modify your system username generation rule to below format and try to see if you're getting your system username generated. please make sure the users have company name being imported and it is not empty. 

case when users.companyname='A' then concat ('ABCD',users.username)
else <put else logic if any>
end

Note: If you have multiple logics to check then you can separate the logics with '###' which works pretty much like operator 'OR' .

Thanks,


Regards,
Pruthvi