All conditions in an Process Builder Criteria Node formula not working - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Julie SteinloskiJulie Steinloski 

All conditions in an Process Builder Criteria Node formula not working

Hi everyone ... I want all three conditions in this formula to create ONE record. It must be new, it must be a disability and it must have A, B, C or D as a client last initial.  I have checked "Do you want to execute the actions only when specified changes are made to the record?"  Right now, TWO records are being created.
 
AND(
ISNEW(),
AND(
[Auto__c].RecordType.DeveloperName ="Disability",
AND(
CASE(LEFT( [Auto__c].Client__r.Last_Name__c  ,1),
"A", 1,
"B", 1,
"C", 1,
"D", 1,
0) = 1
)
)
)

Your help is always appreciated!
Best Answer chosen by Julie Steinloski
Steve MolisSteve Molis
You don't need all of those AND's 
AND(
ISNEW(),
[Auto__c].RecordType.DeveloperName ="Disability",
CASE(LEFT( [Auto__c].Client__r.Last_Name__c  ,1),
"A", 1,
"B", 1,
"C", 1,
"D", 1,
0) = 1
)

PS.  Do you have recursion turned on?

All Answers

Steve MolisSteve Molis
You don't need all of those AND's 
AND(
ISNEW(),
[Auto__c].RecordType.DeveloperName ="Disability",
CASE(LEFT( [Auto__c].Client__r.Last_Name__c  ,1),
"A", 1,
"B", 1,
"C", 1,
"D", 1,
0) = 1
)

PS.  Do you have recursion turned on?
This was selected as the best answer
Steve MolisSteve Molis
Can you post screenshots of youtr Process and the Settings that you are using in each step? 

Do you have any other versions of the Process that are active?
Julie SteinloskiJulie Steinloski
Stove Molis ... It is definitely a Friday and I definitely owe you a beer (or two).  I had been messing around with the AND( because I was getting the duplicates.  I am trying to consolidate three PBs into one and I had not turned the other two off.  Your formula works and your "Do you have any other versions of the Process that are active?" question nailed my problem.  And this is why I'm thankful for sandboxes.  What a nightmare I would have been doing it in Production.  
Steve MolisSteve Molis
No problem Julie, glad you got it sorted out (and thanks for the + Best Answer)