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

Issue while Updating one string attribute based on another in create user form

haardik_verma
Regular Contributor
Regular Contributor

I am trying to populate the "Username" attribute in the create user form, based on the input by the end user in the "Email" attribute.

The requirement is for guest users. So if they enter the email as something@domain.com, I want the username to be auto-populated/auto-updated as guest.something 

Though I am partially able to achieve this, I am facing a couple of issues.

Let me share the config for the Username attribute first

haardik_verma_0-1711482299578.png

haardik_verma_1-1711482322562.pnghaardik_verma_2-1711482356488.png

where the "values" is select distinct concat('guest.', SUBSTRING_INDEX(${Email}, '@', 1)) as ID from users

Now, When the end user opens the Create User page for the 1st time, and click on the username attribute, they see this

haardik_verma_3-1711482521282.png

Now, when they enter an email ID and click on the username attribute again, they still see the same

haardik_verma_4-1711482643675.png

It is only when they choose the "guest." once and then click on the username attribute dropdown again, the username is calculated properly:

haardik_verma_5-1711482733205.png

This is a problem because the end user will not choose it again. (unless we train them, or add a duplicate validation in username attribute which will give them error on form submit, saying that the username "guest." already exists. Then they will click on the username attribute dropdown again and then will see the calculate value. This spoils the user experience)

Secondly, the auto-update happens only once !!! So, if I am in the state where the username has been populated as expected and I have selected it, and now if I modify the email, the username is not updated again..

No matter what I do, like clicking the attribute again or choosing the drop down option again, it does not update.

haardik_verma_6-1711483192643.png

Can someone please guide if I am missing something here? or is there something wrong with my environment?


Thanks & Regards,
Haardik Verma
2 REPLIES 2

PremMahadikar
Regular Contributor III
Regular Contributor III

Hi @haardik_verma ,

The above behaviour is expected. Workaround solution would be to create another dynamic attribute 'Generate username' which would be the key to auto populate username DA.

Use this forum ticket as references:[Solution] https://forums.saviynt.com/t5/third-party-access-governance/register-user-form/m-p/83712?lightbox-me...

If this answers your question, please consider selecting 'Accept As Solution' and hit 'Kudos'

rushikeshvartak
All-Star
All-Star

You can't have String to ENUM Mapping relation hence Please follow solution suggested by @PremMahadikar 


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