12/15/2022 05:47 AM
Hello All,
I am trying to use "contains" in email template like below, but it seems wrong since i got no email when I use this function. can you give me an advice to improve ?
Below are what I have tried but not worked
<% if(${task?.taskdate}.contains('07:'))" print "hello" else print "Bye" %>
<% if((${task?.taskdate}).contains('07:'))" print "hello" else print "Bye" %>
Solved! Go to Solution.
12/15/2022 06:19 AM - edited 12/15/2022 06:23 AM
12/15/2022 06:35 AM
Thanks for your response! but unfortunately, it doesn't work for me ..
12/15/2022 06:44 AM
<%if (task.taskdate.contains('07:')) print "HELLO" else print "BYE" %>
Which mail template are you testing
below should work
<%if (1=1) print "HELLO" else print "BYE" %>
12/15/2022 06:48 AM
I work on the template for endpoint level. doesn't it require "$" to use binding variables ?
12/15/2022 06:54 AM
What is email trigger point ? Task creation / Request Approval ?
12/15/2022 06:57 AM
it's triggered when task completed for remove access
12/15/2022 06:59 AM
<% if ("${task?.source}" == "CERTIFICATION") print "HELLO" else print "BYE" %>
This one works properly. but i'm not sure where to put "contains" in the statement
12/15/2022 07:17 AM
<% if ("${task?.source?.contains("CERTIFICATION")} print "HELLO" else print "BYE" %>
12/15/2022 07:27 AM
Thanks for the prompt answer! I really appreciate it.
but It still won't be working with "contains"...😢
12/15/2022 08:15 AM
Share screenshot on email Template and output
12/15/2022
08:23 AM
- last edited on
12/15/2022
09:20 AM
by
Dave
Below is what i tried as per your suggestion but couldn't get an email.
${task?.taskdate}<br><% if ("${task?.taskdate?.contains('07:')}" print "HELLO" else print "BYE" %> |
but I will get the output like below If I would go with only ${task?taskdate}
12/15/2022 09:14 AM
<%if(task.taskdate.toString().contains('07:')){print "Hello Joon"} else {print "Bye Joon"}%>
Hide Confidential Info
12/15/2022 07:06 PM
I really appreciate it. It finally works !!