Link to home
Start Free TrialLog in
Avatar of simprick
simprick

asked on

CRM 4.0 workflow

Using "or" instead of "and" in workflow

I am trying to say:

If Account:Address 1: State/Province does not equal [NY] or [MA] or [CT],
then:

blah blah blah.

But it seems the condition will only say "and".  I would have also thought I
could use "not in" but it only allows one entry.

If Account:Address 1: State/Province not in [NY]. Can't add any more entries
to this...

Can anyone point me in the right direction?
Avatar of WilyGuy
WilyGuy
Flag of United States of America image

2 ways to do this I think
The Not In is a list, so I just type and separate with comma

So State/Province NOT IN MA, NY, CT

it should save and work as expected.

OTHERWISE, you could cascade some IFs.
If it doesn't equal NY, then the next Condition check is the next state, etc.  basically you drop to the "Else" if none of them are equal.  

I tested the first one (somewhat dirty test) but it worked.

Not great documentation on the NOT IN condition.
OK, weird, my second test failed (of the first method)

Alright, so the second method works.

BUT, I also just added each state as a separate Does Not Equal and it created the AND.  Maybe I am confused what you want to do:

MD or PA or DE - do the workflow action
NY or CT or MA - don't do it....

Am I right?
When I added the three Does Not Equals...I get a (S/P does not equal NY) AND (S/P does not equal CT) AND (S/P does not equal MA)


Avatar of simprick
simprick

ASKER

Thanks WilyGuy.  Here is a little explanation.  States are grouped into sales territories, but not all states just the 17 states we are currently working in.  So I am try to assign leads to the VP of sales if lead is not in one of our currently defined 17 states to determine who to assign the account to.  So I am trying to say (in the most straight forward way)
If Account:Address 1: State/Province does not equal [NY] or [MA] or [CT], (or any of the defined states that are grouped into territories)

then:  Assign lead to VP of Sales (or something to that affect)

I thought of doing the clause for each state but it just seems to be redundant and hard to manage as the states are going to change as the companies grow.  Seems like there should be an easier way to say it.

Thanks
Rick
So you need to just add each state with its own line, then as the states are pulled into territories, you can add a new line.

Still trying to find the syntax for the "NOT IN" (seems like that should be the condition)
Take a look at the WorkFlow Main pic "Otherwise, if Lead:State/Province does not equal [ny] AND Lead:State/Province does not equal [ct], then:

I would have thought I could change the "AND" into an "OR" and that would make it pretty easy, I would just have 17 OR statements, but having to do that (Create check condition, then go to WorkFlow Condition screen, add the state, the add another condition, ect, takes forever, but I guess that is the way it has to be done.  Are you able to add more than 2 characters to the NOT IN clause?  I can't.

WorkFlow-Main.jpg
WorkFlow-Condition-screen.jpg
ASKER CERTIFIED SOLUTION
Avatar of WilyGuy
WilyGuy
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
of course, I can also do that with Does Not Equal....sheesh.
Thanks WilyGuy.  I think I liked the workflow in 3.0 better.