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.

User Registration Preprocessor

flegare
Regular Contributor III
Regular Contributor III

We are attempting to generate a random three-character systemusername as part of user creation.  An existing solution (https://forums.saviynt.com/t5/community-knowledge-base/how-to-generate-a-random-three-letter-systemu...) works fine for connected sources such as Workday.

However, create user request will still use the configured systemusername rule for generation.  Anyone knows if preprocessor behavior can be extended to Create User requests?

7 REPLIES 7

Darshanjain
Saviynt Employee
Saviynt Employee

Hi @flegare 

You can create a Dynamic attribute and use the mentioned logic in DA ( keep the DA as sql and mention the query to generate 3 digit systemusername ). You can save that in systemusername column ( user column field in DA) which should solve your issue.

 

Thanks

Darshan

flegare
Regular Contributor III
Regular Contributor III

Hi @Darshanjain ,

Thanks for the reply, much appreciated.  I am quite new to registration form and have to admit being somewhat puzzled by the interaction with default lifecycle config.

I defined a field as "Single Select from SQL", plugged in a SQL statement generating the appropriate value and referenced systemusername as the User Column.  However, on submitting the request, the systemusername column was regenerated, matching the ootb systemusername rule (first letter of firstname, concatenated with lastname).

Looks like I might be missing something, but not sure what...

Thanks in advance!

Francois

Hi @flegare 

Its a case sensitive field - use the below

systemUserName

 

Thanks

Darshan

flegare
Regular Contributor III
Regular Contributor III

Hi @Darshanjain ,

Yeah, should have thought of that...  Thanks a lot for your help!  Oh, and on a somewhat-related note, is there any way I can make this field a simple string field instead of a user-input-required drop-down? I cannot find a way to get a character field populated from a SQL statement...

Thanks again!

Francois

 

Hi @flegare 

If you make it as a string then it won't be able to generate a random number, in sql try to put it in default value as well so that it can populate automatically 

 

Thanks

Darshan 

flegare
Regular Contributor III
Regular Contributor III

Hi @Darshanjain ,

The original requirement is to generate a unique string that does not conflict with existing values and does not match a static list of forbidden values.  The statement looks like: select random-three-character-string as ID where ID not in (select distinct systemusername from users) and ID not in ('AAA','BBB', etc).

This works great in about 85% of the cases.  Occasionally, however, the value generated conflicts either with an existing systemusername or one of the values that is part of the prohibited list.  In this case, there is no value populated by default and the user has to regenerate it, sometimes having to regenerate more than one value if another conflicting value is generated.  Is there any way to force a retry of the value generation?  Or is there anything that could be done with the statement to make sure something comes out?  Not sure where I went wrong in all this...

Thanks again!

Francois

Hi @flegare 

Yes, this can occur at some times and the only possible solution is to make this as required field and user has to be regenerate it. As this is a simple sql there is no option to regenerate it automatically.

 

Thanks

Darshan