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

Validation on Email only for Selected user.type

JohnK
New Contributor
New Contributor

Hi We use the user form to create a user, we have 3 user types however use the same attribute to collect email, for one of the user types we need to check if the email is unique across all users of the same type, so when hit submit check unique email and if Unique proceed if not Unique error and ask to change email address. Any way i can implement this into the Create User Request Form? I looked at Validation but not sure I can add a SQL query in there.

6 REPLIES 6

rushikeshvartak
All-Star
All-Star

You can't add SQL query in validation


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

Thanks I know that but what is the best way I can handle this? would it be workflow and Groovy script? reason I ask is wouldn't workflow only execute after submit, how else can I verify unique email only for a particular user type? During user create form when hit Submit

NM
Honored Contributor II
Honored Contributor II

Hi @JohnK validation works in that particular value.

Initial thought would be created another DA .. which look for the email value entered in users table if found label - email address exist add a unique one else .. email address is unique.

And if in case they submit the request with duplicate email address handle the case in workflow too.

JohnK
New Contributor
New Contributor

Yeah I was thinking the same thing only issue my User form is so slow already so trying to avoid additional attributes calling SQL queries, I'll try it in test system when I get a chance next week

NM
Honored Contributor II
Honored Contributor II

@JohnK sure do update us.

If you found the suggestion helpful please hit kudos button and accept the solution.

Thanks.

  • You can create additional SQL query using dynamic attribute to validate it.
  • If your user form is slow its due to indexing Please use columns which having indexing.
  • Raise support ticket to know indexed columns under tables

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