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
Robert WynterRobert Wynter 

Workflow rule using formula criteria to update fields

I'm using a formulas to verify if 2 fields have changed from specific values to specific values. When I applied it to 1 field it works. I'm having trouble verifying 2 fields in the formula. Can I please get help tweaking this formula below. I want that if both Status__c and Approval_Progres__cc are changed from New to Active/Approved:

AND( 
ISPICKVAL(PRIORVALUE(Status__c),'New'), 
ISPICKVAL(Status__c, "Active") && ISPICKVAL(PRIORVALUE(Approval_Progress__c),'New'), 
ISPICKVAL(Status__c, "Approved"))
Best Answer chosen by Robert Wynter
Jordan FrankJordan Frank
AND(
    ISPICKVAL(PRIORVALUE(Status__c),"New"), ISPICKVAL(Status__c, "Active"), 
    ISPICKVAL(PRIORVALUE(Approval_Progress__c), "New"), 
    ISPICKVAL(Approval_Progress__c, "Approved"))
Wouldn't you want to check if Status = Active & Approval Progress = Approved? In the above examples you are checking if Status = Active
& if Status = Approved. 
 

All Answers

DebasisDebasis
HI Robert,

if you want  both Status and Approval progress changes from new to Active/Approved please use below formula.
And(
	ISPICKVAL(PRIORVALUE(Status__c),'New'), ISPICKVAL(Status__c, "Active"),ISPICKVAL(PRIORVALUE(Approval_Progress__c),'New'),ISPICKVAL(Status__c, "Approved"))
	
)

if you want either of them change then use below formula
OR(And(ISPICKVAL(PRIORVALUE(Status__c),'New'), ISPICKVAL(Status__c, "Active")),And(ISPICKVAL(PRIORVALUE(Approval_Progress__c),'New'),ISPICKVAL(Status__c, "Approved")))


Thanks,
Debasis
Robert WynterRobert Wynter
Hi Debasis, I want both Status and Approval Progress changes from New to Active/Approved. Thank you for the suggestions. I tried your first code syntax but it did not trigger the updates. Any suggestions? Thanks, Robert Wynter
Jordan FrankJordan Frank
AND(
    ISPICKVAL(PRIORVALUE(Status__c),"New"), ISPICKVAL(Status__c, "Active"), 
    ISPICKVAL(PRIORVALUE(Approval_Progress__c), "New"), 
    ISPICKVAL(Approval_Progress__c, "Approved"))
Wouldn't you want to check if Status = Active & Approval Progress = Approved? In the above examples you are checking if Status = Active
& if Status = Approved. 
 
This was selected as the best answer
Jordan FrankJordan Frank
Please ignore the <i>  <b>, I had that line in Bold and Italic's to show where the issue was. 
Robert WynterRobert Wynter
I do want to check if Status == Active and Approval Progress == Approved. I did get it to work using &&. Although now that you pointed out what my typo error was having Status == Approve instead of Active. Your AND syntax also works for me. Thanks Robert Wynter