When trying to save the below formula I get this error:
The formula expression is invalid: Syntax error. Missing ')' Help Please
Why do I get this error? How can I fix it?
AND(
IF ( ISBLANK( [Case].ContactId) , false,
AND( ![Case].Contact.CSATOptOut__c,
OR( ISNULL(Contact.CSAT_Date__c ), true,
Contact.CSAT_Date__c <= TODAY() -5 ),
OR(
RecordTypeId = 0128E0000009Fd5QAE,
ISPICKVAL( Origin, "Telefon", "Chat" )
),
ISBLANK( Contact.MemberInGroup__c, false ),
ISPICKVAL( Status, "Avslutat" ),
OwnerId <= "NatterBox",
OwnerId <= "API-User Api-User",
NOT( ISPICKVAL( CaseReason, "Inget svar" )),
Contact.CreatedDate <= NOW()
)
)
)
Best Answer
There are quite a few errors in your formula
AND
operator.AND
operator needs at least 2 values. (Top mostAND
)ISPICKVAL
with 3 parameters whereas it takes only twoOwnerId
field with<=
operator, I think it should be either==
or!=
OwnerId
is the Id field, so it will contain the Id and notName
, rather you will have to compare withOwner.Name
The error you are getting is because of the first point i.e. if you don't have anything else to pass to
AND
operator, remove that operator or else pass the other value.On solving this issue, you will get the remaining errors which I mentioned above which will help you fix this.