+ Start a Discussion
Chris ParisChris Paris 

Opportunity Validation Rule - Formula Multiple Variables

I know this is likely a quick fix but we are trying to add in a new value to an existing working validation formula.  Currently, the existing validation rule below works to freeze opportunties from editing when the approval status is "sent for approval".  

The formula : 
AND(((ISPICKVAL( PRIORVALUE(Approval_Status__c),"Sent for Approval"))),NOT(OR($Profile.Name = "System Administrator", $Profile.Name = "Finance and Administration", $Profile.Name = "Finance Testing", $Profile.Name = "Sales Testing" )))

We are trying to use the formula above to filter for Approval Status both "Sent for Approval" and "Approved".  Any help would be great!

Many Thanks!
Best Answer chosen by Chris Paris
ManojjenaManojjena
Hi Chris,
Here you are using prior value to check the old value ,But what I understood here in new formula you do n't need old valaue to compare .
If yes then use below formula it will help .
 
AND(OR(ISPICKVAL(Approval_Status__c,"Sent for Approval"),ISPICKVAL(Approval_Status__c,"Approved")),NOT(OR($Profile.Name = "System Administrator", $Profile.Name = "Finance and Administration", $Profile.Name = "Finance Testing", $Profile.Name = "Sales Testing" )))

 

All Answers

ManojjenaManojjena
Hi Chris,
Here you are using prior value to check the old value ,But what I understood here in new formula you do n't need old valaue to compare .
If yes then use below formula it will help .
 
AND(OR(ISPICKVAL(Approval_Status__c,"Sent for Approval"),ISPICKVAL(Approval_Status__c,"Approved")),NOT(OR($Profile.Name = "System Administrator", $Profile.Name = "Finance and Administration", $Profile.Name = "Finance Testing", $Profile.Name = "Sales Testing" )))

 
This was selected as the best answer
Chris ParisChris Paris
This works perfectly.  Thanks Manoj!