and more in a single search tool across platforms. Read the announcement here. |
03/20/2024 03:13 PM
Hi All,
I am wondering what the syntax is or if it is possible to do a "like" evaluation in the email template where if the user's email contain a phrase like "_converted" then IGA shouldn't send the email, else send the email to e.g. the manager. For testing purposes I have included some other email addresses in CP64 and CP65 to see if the email goes through. So far it hasn't worked when I use "like" condition.
Failing code in TO: <% if (user?.email like '%_converted%') print "${user?.customproperty65}" else print "${user?.customproperty64}"%>
Thank you,
Chandu K.
Solved! Go to Solution.
03/20/2024 04:22 PM
Hi @chandu_k09 ,
I am not sure if 'like' will work here.
But contains should work. Try below:
<% if(user.email.toString().contains('_converted')){print "${user?.customproperty65}"} else {print "${user?.customproperty64}"}%>
If this reply answers your question, please consider selecting Accept As Solution and hit kudos.
03/20/2024 09:57 PM
Email template uses java functions and not mysql methods.
<% if(user?.email.contains('_converted')){print "${user?.customproperty65}"} else {print "${user?.customproperty64}"}%>
03/21/2024 03:20 PM
Hi Rushikesh and Prem,
Thanks for your suggestions and feedback.
@PremMahadikar I didn't check the "tostring" method. But the .contains worked anyway and the issue is now resolved.
Kind regards,
Chandu