Click HERE to see how Saviynt Intelligence is transforming the industry. |
06/13/2024 02:05 PM
Can we use select statement in "to" field of email templates along with if else?
I am trying to use this basic select query to find the user email uniqueness and if it is unique then user.email should be returned or else manager.email
<%if ((select count(email) from users where email LIKE user.email) <= 1) print "${user.email}" else print "${manager.email}" %>
I am getting the below error:
06/13/2024 08:31 PM - edited 06/13/2024 08:32 PM
SQL query are not supported in email template.
Please confirm your requirement to provide workaround
06/13/2024 08:55 PM
Here is the requirement for to field of email template:
Check if user's email is unique. If unique then set TO field to user's email and not unique then set manager's email in to field.
Uniqueness needs to be checked against sav user's email
06/13/2024 09:09 PM
This is not supported to check unique email against users list.