2

I'm trying to create a workflow rule that fires when:

  1. Status = New
  2. Type = Incident
  3. Origin is not Production Monitoring or Proactive outreach AND
  4. Does not have BOTH of these picklist values A. Origin = Web Inquiry B. Category = Change Form

The way it is written right now, if it has either of #4's picklist values it is not firing. Any help would be greatly appreciated.

AND(
    ISPICKVAL( Status, "New"),
    ISPICKVAL(Type, "Incident"),
    NOT(ISPICKVAL (Origin, "Production Monitoring")),
    NOT(ISPICKVAL (Origin, "Proactive Outreach")),
    AND(
        NOT(ISPICKVAL(Origin, "Web Inquiry")),
        NOT(ISPICKVAL(Category__c, "Change Form"))
    )
)
4
  • 1
    I would avoid using && and ! in your formulas and instead use AND and NOT respectively. That will make them more readable imho.
    – Adrian Larson
    Dec 14, 2015 at 23:29
  • Okay, how about this? code AND(ISPICKVAL( Status, "New"), ISPICKVAL(Type, "Incident"), NOT(ISPICKVAL (Origin, "Production Monitoring")), NOT(ISPICKVAL (Origin, "Proactive Outreach")), AND(NOT(ISPICKVAL(Origin, "Web Inquiry")), NOT(ISPICKVAL(Category__c, "Change Form"))))code Dec 15, 2015 at 0:09
  • It is better to make edits to your post than dump code in comments. It looks like you got it though. I edited your post for you.
    – Adrian Larson
    Dec 15, 2015 at 0:11
  • Still doesn't work. It's treating the second AND as an either or. If I create a case with an origin of "Web Inquiry' it isn't firing. I only want it to not fire if the origin is 'Web Inquiry' and the Category is 'Change Form' Dec 15, 2015 at 0:14

1 Answer 1

2

You just need to invert your NOT and AND in the final clause:

NOT(
    AND(
        ISPICKVAL(Origin, "Web Inquiry"),
        ISPICKVAL(Category__c, "Change Form")
    )
)
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .