Click HERE to see how Saviynt Intelligence is transforming the industry. |
08/01/2024 07:18 AM
Hello,
I'm looking to filter the recipients of an email template. What would be the syntax of the "does not contain" operation in the To: filed of an email template?
Example:
TO:
<% if (${user?.CUSTOMPROPERTY12} !='Y' && ${user?.CUSTOMPROPERTY20} == 'NewHire' && ${user?.LOCATIONDESC}*does not contain* 'Remote' and ${user?.title} *does not contain*'%FEMA%' && ${user?.employeetype} !='EX' and ${user?.statuskey} ='1') print "Adam@test.com" else print "" %>
08/01/2024 07:23 AM
<% if (${user?.CUSTOMPROPERTY12} != 'Y' && ${user?.CUSTOMPROPERTY20} == 'NewHire' && !${user?.LOCATIONDESC}.contains('Remote') && !${user?.title}.contains('FEMA') && ${user?.employeetype} != 'EX' && ${user?.statuskey} == '1') print("Adam@test.com") else print("") %>
08/01/2024 02:41 PM
Thank you for the response. I'm getting the following error. Looks like it doenst like the P
2024-08-01T16:14:14-05:00-ecm-worker--null-x4c9f--2024-08-01T21:14:14.293444979Z stdout F 2024-08-01 21:14:14,293 [quartzScheduler_Worker-6] DEBUG changeaction.UserChangeActionService - NEW RULEACTIONFAILED = {"actionName":"Notify As An Email","ruleName":"Test Email Template","ruleKey":484,"actionFields":{"emailTemplate":"Facilities_POC"},"failureReason":"Failed to parse template script (your template may contain an error or be trying to use expressions not currently supported): startup failed:\nSimpleTemplateScript2978.groovy: 1: expecting ')', found 'print' @ line 1, column 57.\n ser?.CUSTOMPROPERTY12} != 'Y' print(\"Ada\n ^\n\n1 error\n"}
08/01/2024 08:46 PM
<%
if (user?.CUSTOMPROPERTY12 != 'Y' &&
user?.CUSTOMPROPERTY20 == 'NewHire' &&
!user?.LOCATIONDESC.contains('Remote') &&
!user?.title.contains('FEMA') &&
user?.employeetype != 'EX' &&
user?.statuskey == '1') {
print "Adam@test.com"
} else {
print""
}
%>