and more in a single search tool across platforms. Read the announcement here. |
03/26/2024 01:00 PM
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
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
Now, when they enter an email ID and click on the username attribute again, they still see the same
It is only when they choose the "guest." once and then click on the username attribute dropdown again, the username is calculated properly:
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.
Can someone please guide if I am missing something here? or is there something wrong with my environment?
03/26/2024 05:15 PM
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'
03/26/2024 07:37 PM
You can't have String to ENUM Mapping relation hence Please follow solution suggested by @PremMahadikar