function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jaime Blalock 4Jaime Blalock 4 

Formula changes not working

Hello!

I have this formula for a workflow and it works but I needed to add two addtional email addresses I wanted to exclude from the 2 hour case not worked notification. Here's the original formula:

AND(
ISPICKVAL(Status, "Not Started"),  
NOT(ISBLANK(Inbound_Email_Address_To__c)), (NOT(CONTAINS(Inbound_Email_Address_To__c,"randoms@medicalreviewoffice.com")) &&    NOT(CONTAINS(Inbound_Email_Address_To__c,"info@medicalreviewoffice.com"))),
(WEEKDAY(DATEVALUE(CreatedDate)) <> 1 && WEEKDAY(DATEVALUE(CreatedDate)) <> 7), 
(8 <= VALUE(MID(TEXT(CreatedDate), 12,2)) && VALUE(MID(TEXT(CreatedDate),12,2)) < 24))

Here's what I edited to add the two new in bound email address to exclude:

AND(
ISPICKVAL(Status, "Not Started"), 
NOT(ISBLANK(Inbound_Email_Address_To__c)), NOT(CONTAINS(Inbound_Email_Address_To__c,"randoms@medicalreviewoffice.com"))&& NOT(CONTAINS(Inbound_Email_Address_To__c,"info@medicalreviewoffice.com"))&& NOT(CONTAINS(Inbound_Email_Address_To__c,"dispatch@clearstar.net")&& NOT(CONTAINS(Inbound_Email_Address_To__c,"mailer-daemon@mx0b-0040d601.pphosted.com")),
WEEKDAY(DATEVALUE(CreatedDate)) <> 1 && WEEKDAY(DATEVALUE(CreatedDate)) <> 7,
8 <= VALUE(MID(TEXT(CreatedDate), 12,2)) && VALUE(MID(TEXT(CreatedDate),12,2)) < 24)

It still sends 2 hour reminders on the emails I am asking it to exclude. Any Idea what I am doing wrong?

Workflow screenshot
Maharajan CMaharajan C
Hi Jaime,

Try the below formula:

AND(
ISPICKVAL(Status, "Not Started"),  
NOT(ISBLANK(Inbound_Email_Address_To__c)), 
(NOT(CONTAINS(Inbound_Email_Address_To__c,"randoms@medicalreviewoffice.com")) &&
NOT(CONTAINS(Inbound_Email_Address_To__c,"info@medicalreviewoffice.com")) && 
NOT(CONTAINS(Inbound_Email_Address_To__c,"dispatch@clearstar.net")) && 
NOT(CONTAINS(Inbound_Email_Address_To__c,"mailer-daemon@mx0b-0040d601.pphosted.com"))),
(WEEKDAY(DATEVALUE(CreatedDate)) <> 1 && WEEKDAY(DATEVALUE(CreatedDate)) <> 7), 
(8 <= VALUE(MID(TEXT(CreatedDate), 12,2)) && VALUE(MID(TEXT(CreatedDate),12,2)) < 24))


Also please verify the test data you have used is met the criteria to fire the WF. Some time data issue also be there even the formula is correct.

Thanks,
Maharajan.C 
Jaime Blalock 4Jaime Blalock 4
Hi Maharajan,

I have tried and tested your formula and I am still getting the undesired 2 hour email notififcations on the added criteria (field for in-bound email address). An other suggestions? The in-bound email address in the case is populated with the appropriate email address.